I am having difficulties using javascript expression within a convertion map. The following expression is correctly processed on serverside by rollbase when used in a date field but it will not get processed in a text field. (new Date(rbv_api.getCurrentDate()); // this is only an example. Other expressions have the same behavior Am I missing something?
I think for the Current Date on data maps you have the option to use Current Date as the default value on the converted record, I checked on one of my maps and used the picklist to select Current Date for its field. Not sure if this is just limited to Date or Date/Time fields.
Hope this helps,
Piscoso Martin
For other date expressions, I'm not quite sure if you can use the reserved words for List Views like - TODAY.
As for other data types, you can probably save the data onto another field on your parent record so you can map that instead of making an expression on the conversion map.
Hope this helps,
Piscoso Martin
Formulas in conversion maps were intended to be a simple expressions. However I can extend this to server-side API as well.
Hi Pavel, Just curious, what are the valid expressions on our conversion maps? Thanks.
Piscoso, Martin
It would be great if you could actually extend expressions in convertion maps to server-side API.
That's exactly what I need.
(Still, it is strange that expressions (formulas) in convertion maps are not all processed the same way depending on data type.)
Would this be long to implement?
According to the doc "Rollbase in Action":
"An expression can be a simple formula built from source Field tokens the same way as other formulas are constructed (see Chapter 6. Server-side Code: Templates, Formulas and the Rollbase Query API for more details)"
I'll see what can be done.