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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (7,494)