cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Post Prodigy
Post Prodigy

Can i concatenate the variable when i set its value

I am setting a variable as follow:-

 

conact.png

 

but can i self-reference the variable as follow:-

 

Set(VarPhoneOption, VarPhoneOption + "Mobile");

 

if i try to do so i will get this error "Invalid argument..":-

 

invalid.png

any advice?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Use the Concatenate() function instead of an operator.

Set(VarPhoneOption, Concatenate(VarPhoneOption,"Mobile"));


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User III
Dual Super User III

Use the Concatenate() function instead of an operator.

Set(VarPhoneOption, Concatenate(VarPhoneOption,"Mobile"));


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

AmDev
Solution Sage
Solution Sage

Note you can also use

 

Set(VarPhoneOption, VarPhoneOption & "Mobile")

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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