cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
techtudoor
Resolver I
Resolver I

Concat comboboxes to update text field

Hello PowerApps Community,

 

      I am working on a checkout app that users need to set their length of time they will have an item checked out. I am using SharePoint Lists for my datasource. My Duration field is a text field. I have added two comboboxes to my data card named, Numerical and Interval. I am trying to have the users select a number from the numerical combobox and a value (days, months, week). When they submit their request I need the text field to show "x days" or "x weeks" or "x months". I have manually set the comboboxes items and they do show up.

When I use

Concat(Numerical.SelectedItems, Interval.Selected.Values) it only shows the interval item (days, weeks, months)

 

When I use Concat(Duration, Numerical.SelectedItems, Interval.Selected.Values) it shows both Numerical and Interval repeating (1week1week1week.......)

 

When I try

Numerical.SelectedItems & Interval.Selected.Values it shows false.

 

How can I get the number and (days, weeks, months) to show up in the text field? I am trying to make the PowerApp so that all responses follow a uniformed method and avoid, "I need it for awhile" or some other non definitive remarks.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
DylanSimons
Resolver III
Resolver III

The concat() function does not do what you are expecting. it concatenates entire fields in tables. Instead what you are looking for is Concatenate().

 

The reason that

Numerical.SelectedItems & Interval.Selected.Values

 doesn't work is that you are passing variables that are not Text. It needs to be something like this in the end:

 

Concatenate(Numerical.Selected.Value, " ", Interval.Selected.Value)

 

View solution in original post

3 REPLIES 3
DylanSimons
Resolver III
Resolver III

The concat() function does not do what you are expecting. it concatenates entire fields in tables. Instead what you are looking for is Concatenate().

 

The reason that

Numerical.SelectedItems & Interval.Selected.Values

 doesn't work is that you are passing variables that are not Text. It needs to be something like this in the end:

 

Concatenate(Numerical.Selected.Value, " ", Interval.Selected.Value)

 

Hi @techtudoor 

 

Concat function is used to concat values in a table. Since you want to concat selections, can you try to update the expressions to:

Numerical.Selected.ColumnName&" "&Interval.Selected.ColumnName

Here, you need to replace ColumnName with the name of column from the combobox. If it is static array, then the name of column will be value.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Thank you @DylanSimons , concatenate worked perfectly. I have gotten away from using concatenate, that I forgot that it is still an option.

 

Thank you

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,962)