Question
Erste Digital
AT
Last activity: 17 Oct 2019 4:16 EDT
Unable to find any function to convert property to String
We are using Pega Infinity 8.1.1. We have a decimal property that we want to convert to date. toDate function is not able to do it directly as it's setting the value to default date 01/01/1970. So, I was trying to convert the decimal into string and then format that value with FormatDateTime function.But, I am not getting any toString() function to convert any property to string format. Please feel free to suggest necessary actions to be taken on this.
Hi @RumelaB4,
I guess you have found a solution to convert the decimal to string by writing a code.
However, when you assign a decimal property value to a text property, Pega will take care of the conversion.
I configured a similar use case where I am entering a 20190101. in a decimal property. A OnChange action set is configured to with Post Value and Refresh This Section (I am calling Data Transform while Refreshing) the section). In the data transform I am assigning the decimal property value to Text property. After this we can convert to date property with OOTB function. This worked for me.
Hope this also helps you.
Regards,
Priyabharathi