Hello All,
Is there any way we can convert a datatype of column while querying from DB using query entity?
Thank you in advance.
Discussion posts and replies are publicly visible
Not using queryEntity. You can convert the type after you query the data.
A better approach would be to create a synced record type. You can create custom fields which would convert the datatype even before you query the data.
I don't know if you could try to cast the result of the query as a similar CDT with the same fields but sometimes a different datatype for a given field, and that could be within the same rule as the QE. You could save the .data of the query result into a rule input whose type is a similar CDT. It won't work with a local variable because they take on the type of whatever you put in them. It's possible that implicit casting would take over. If it works, this is probably the simplest approach outside of synched records, which you should definitely check out if you can.
Aside from that, no, you get the data as step one, and then convert it as needed as step two.
I would be interested in the purpose. What do you want to achieve?