cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nighthawk75
New Member

Variable Text to Value Question

Ok so this has me stumped. I'm trying to set a value based on a text field so basically if the field is text display the text if it's numeric change the ID and display the next question.

 

So I have this.

Set(NewQuestion,PlainText(SelectedAnswer);

If(Len(SelectedAnswer<=3,Set(QID,Value(NewQuestion))

 

So it works fine to display the text values but when the value is 3 it should convert NewQuestion (which I've confirmed is set to 3) to a numeric value and set QID=3 but instead QID becomes blank and it says QID is a number but Value(NewQuestion) is text? What gives? Why isn't Value(3) becoming a number and getting set as the new QID am I missing something?

1 REPLY 1
CNT
Super User
Super User

@nighthawk75 A couple of things,

  1. You are missing a bracket at then end of the Len function.
  2. The Len function is taking SelectedAnswer and not NewQuestion as the parameter. Is SelectedAnswer also of length 3?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,867)