Using Expression within Convertion Map

Posted by Rollbase User on 01-Oct-2011 19:25

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?

All Replies

Posted by Admin on 01-Oct-2011 21:42

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

Posted by Admin on 01-Oct-2011 21:45

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

Posted by Admin on 01-Oct-2011 23:05

Formulas in conversion maps were intended to be a simple expressions. However I can extend this to server-side API as well.

Posted by Admin on 02-Oct-2011 10:23

Hi Pavel, Just curious, what are the valid expressions on our conversion maps? Thanks.



Piscoso, Martin

Posted by Admin on 02-Oct-2011 23:52

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?

Posted by Admin on 02-Oct-2011 23:54

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)"





Posted by Admin on 03-Oct-2011 11:39

I'll see what can be done.

This thread is closed