cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Setting Variables and Concatenating Values

This is probably going to be an either or answer so let me describe what I am doing.

 

Scenario:

 

Dropdown1 - Holiday (Data Source: SharePoint Holiday list, Single Line of Text)

Dropdown2 - Prefix (Data Source: Filtered SharePoint Descriptors list, Single Line of Text)

Dropdown3 - Suffix (Data Source: Filtered SharePoint Descriptors list, Single Line of Text)

tiSwapwith - text

 

Desired Outcome:   Concatenate the values of the the 4 listed fields to compose the 'Official' Holiday Name

 

Example: 

     Dropdown4 (Holiday) = Christmas

     Dropdown2 (prefix) = blank

     Dropdown3 (Suffix) = Holiday

     tiSwapWith = Observed

 

Outcome:  Christmas Holiday Observed

 

I have tried using Concat 4 different ways: (just the basics, not including any IF statements to exclude fields if they are blank at this point).   **Important Note:  'Value' is not an available option.

 

1.  Using one of the available options for the field

concat1.jpg

 

2.  Using a different set of available options for the field

concat2.jpg

 

3.  Trying a different set of option, but one isn't valid.

concat3.jpg

 

4.  Trying this way

concat4.jpg

 

Since I wasn't able to make this work, I thought I could set the values of these fields to variables and then use the variables in the Concat function.  

 

How can I set multiple variables with a single set command?

 

I start with Set(varHolidayName, Dropdown4.SelectedText.....    but don't know how to finish this to add (varPrefix, Dropdown2.SelectedText) and (varSuffix, Dropdown2.SelectedText

 

Once I get the basics here down I will add in the IF, IsBlank() etc. to be able set correctly concat using only the fields that have values in them.

 

All suggestions are greatly appreciated.

 

 

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions

Ok, I figured it out.  Because it's a SharePoint list data source, you have to use the field name from the list.   Dropdown2.Selected.Title

 

Dropdown2.Selected.Value isn't an option but if you select Title it works.



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

View solution in original post

7 REPLIES 7
Super User III
Super User III

Hi @JR-BejeweledOne 

I think the main issue here is that you're missing the field name after the Selected or SelectedText properties.

For example, if you type a dot after Selected, the Intellisense should show you the available field names and you can then select the one that's appropriate.

 

image.png

Hope that's of some help.

It's Friday!

 

If I try to use Dropdown4.Selected.   There is no additional option such as Value or Text.  

 

Thanks.  



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

Hi @JR-BejeweledOne , Hopefully, Dropdown4.Selected.Value etc should work for you...

I had to edit that reply because that went away and just isn't there now,  not sure why it was showing for a brief time.



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

To diagnose this further, if you add a label and type in just Dropdown2.Selected, do you see the help panel beneath that shows the name of the available fields and values?

 

image.png

Yes, I do but 'Value' is not an option for Dropdown2.Selected in the Concatenate function



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

Ok, I figured it out.  Because it's a SharePoint list data source, you have to use the field name from the list.   Dropdown2.Selected.Title

 

Dropdown2.Selected.Value isn't an option but if you select Title it works.



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

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (27,917)