cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Casting integer as string lost when condition switches to basic mode

Typeform returns a numeric rating field value as a string, e.g. 5 is "5".

 

Flow's conditions don't like comparing integers with strings.

 

No problem! If you can switch to advanced mode, you can manually mark a number as a string:

 

@equals(triggerBody()?['5: Awesomeometer rating'], '5')

 

... however, if you switch the condition back to basic mode, and then back to advanced, the string is cast back to an integer:

 

@equals(triggerBody()?['5: Awesomeometer rating'], 5)

This is a problem, because if you edit a flow, the default view of a condition is "basic mode". This means that if I ever come back to edit the flow in the future, and forget to change the strings, my flow will break.

 

Is there any way around this? Or is this a bug? Because it feels like a bug...

 

 

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Casting integer as string lost when condition switches to basic mode

Hi @Anonymous,

 

Thanks for reporting this.

Yes, there is a way to workaround this.

Try the convert function, change the formula under the condition advanced mode as below:

@equals(
      triggerBody()?['5: Awesomeometer rating'], 
      string(5)
)

Function reference:

Workflow Definition Language

The product team should notice this, i will also forward a feedback on this.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,789)