web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / create a variable name...
Power Apps
Unanswered

create a variable name with another variable

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

I have a problem here:

 

I want to create a variable name with a concatenate function but this doesn't work:

 

Set("varNon"&varNum;"")

 

You have to know that varNum is a variable already created (no problem with that).

The variable name should look like this: varNon3 or varNon4 ... according to the varNum variable value.

 

I'll really appreciate some help!

 

Thanks!

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Try:

    Set(var1,"abc");Set(var2,"sse");Set(Var3,var1&var2)

    set.JPG

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the answer!

     

    let me expose my problem maybe you will be able to help me out:

     

    I have a form like this:

    For each question of the form, In the function OnChange you can see that I set my 2 variables: VarNonQuestionNumber (and I but this variable in the Default property) and VarNum for the number of the question.

    Capture.PNG

     

    And when people clic "Non" in the drop down; the function OnChange gets me in another page:

    Alexx1_0-1611223513974.png

     

    When people clic on the "X" Icon to quit this page, I want the dropdown to take the Empty value (""). Thats why I have to set a different variable name each time..

     

    That's why I am creating a new variable for each question; so that if they clic the "X" to exit the page, it only updates the value of the last question..

     

    I hope I was clear, and if you have any idea to do it an other way I would appreciate!

     

    Thanks for your time

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard