Convert Boolean Entity Attribute to an Integer

0
I have an entity that contains a Boolean attribute and I would like to display it on a timeseries chart.  Is there any way of using a microflow (or any other method) to convert all values of said Boolean attribute to integers (false being 0 and true being 1?
asked
1 answers
1

Hi Ben,

To do this I think you should use a microflow.

- On the entity create a second attribute to contain the integer

- Create a new microflow to convert your existing data

- Retrieve all objects of the entity you need to change

- Loop over the objects and set a change action in the loop to set the new attribute, where: if boolean = true then 1 else 0.

- Commit the list of objects

- In you existing logic check for places where the boolean is set and make sure the new integer attribute is set as well.

 

Hope this helps!

 

answered