How can I use the condition flow with a value that could be a null or integer

Viewed 26

In my Sharepoint I've a calculated field, that cold be empty, and could be having a value, based on the AgreedIncidents we have in the agreement with the customer, if the AgreedIncidents is open aka unlimitted then we ended up having the balance incidents as null or empty whatever the UsedIncidents are.

enter image description here

In my power automate flow, i want to check if the SLA is valid or no, it could be a valid one if 2 conditions achieved:

  1. SLA is live, i.e. expiration date not yet came
  2. Number of used incidents is equal to the agreed ones, if the agreed ones is defined, it is easy to calculate the BalanceIncidents, but if the Agreed Incidents is open we can not do this calculation.

I tried to make the condition flow as below, but the power automate did not accept it telling that 2 types of BalancedIncidents are in use, int and string~

enter image description here

1 Answers

Unfortunately calculated columns are returned as string values in Power Automate, even though you configure them as number outputs in the SharePoint settings. So, I would suggest to turn it into a int so you can compare the two.

For the second condition I would use:

empty(items('Apply_to_each')?['BalanceIncidents'])

is equal to true

For the last condition I would use:

int(items('Apply_to_each')?['BalanceIncidents'])

is greater than 0

Related