I have a bot topic that at some point, needs to set a variable based on a choice the user has made in a previous part of the flow.
The problem is, the Choice field is not recognised as a same comparable type as Text, so my formula isn't working. I've had this issue before using Power fx with Power Apps, and I know that there is a way to reference the choice itself, rather than a text value, but there appears to be no "Choices" function built into the PVA side of things. Does anyone know how I reference the Choice correctly?
Here's a sample of the code not working below:
If(Topic.selectedColor = "Blue", true, false)
The error I'm receiving is:
Thanks
Fantastic, thanks @HenryJammes - I'm not sure why I didn't even think about casting as Text but I'm glad it works and you pointed it out! Thanks again.
Can you try by changing the format of your variable to text?
If(Text(Topic.selectedColor) = "Blue", true, false)
Also, not sure if it helps, but I had explored dynamic options in that post, and I manipulated these in Power Fx too:
Pablo Roldan
25
Romain The Low-Code...
23
stampcoin
10