Closed
How to format amount value in activity
Hi all,
I want to format my amount value in the activity like this "1.500,10". How is it possible?
Thank you.
This content is closed to future replies and is no longer being maintained or updated.
Links may no longer function. If you have a similar request, please write a new post.
Hi all,
I want to format my amount value in the activity like this "1.500,10". How is it possible?
Thank you.
straightforward approach is to use a java step with concat/substring logic in it to amend your string value.
More right approach would be to understand why do you need it. For example, if you want to show it in a control in a section, it's better to use Edit Validate rule in the property itself
I get amount values via external database in an activity. Then, the activity send information email. all amount need seem formatted in this email body.
then, you could use editInput java step.
For example:
ClipboardProperty targetProp = tools.getProperty("PropertyName");
String initialValue = tools.getProperty("PropertyName").toString();
String editRuleName = "EditInputRuleName";
tools.editInput(targetProp, initialValue, editRuleName);
(note, that your property must be of a text type)
But you could try easier approach.
AFAIK, whenever a property is used in a html rule (like correspondece, in your case), any edit input rule assigned to this property will be executed. So you could just add an edit input rule to your property and mention it in the correspondence rule. It should work OOTB. If you'd try this, share the results, please
Thank you for your reply.
I used "edit input" for my property. but it did not work correctly in my correspondence.
1. What the type of your property? integer/text?
2. Could you attach screenshots of your configuration?
3. Did you try first solution (with java step)?
Question
Question Solved
Question Solved
Question
Question Solved
Question Solved
Question
Question
Question
Question Solved
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.