cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Level: Powered On

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.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Level: Powered On

Re: Setting Variables and Concatenating Values

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.

View solution in original post

7 REPLIES 7
Super User
Super User

Re: Setting Variables and Concatenating Values

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.

JR-BejeweledOne
Level: Powered On

Re: Setting Variables and Concatenating Values

It's Friday!

 

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

 

Thanks.  

Super User
Super User

Re: Setting Variables and Concatenating Values

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

Highlighted
JR-BejeweledOne
Level: Powered On

Re: Setting Variables and Concatenating Values

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.

Super User
Super User

Re: Setting Variables and Concatenating Values

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

JR-BejeweledOne
Level: Powered On

Re: Setting Variables and Concatenating Values

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

JR-BejeweledOne
Level: Powered On

Re: Setting Variables and Concatenating Values

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,922)