cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Getting one KPI to connect to a list of selected values

Hello all,

 

I am trying to create a functionality that lets you choose multiple customers from a list, while punching the KPI value in just once.

My current formula looks like this:

TRY2.Run(1_INPUT;2_INPUT;3_INPUT;KPI_INPUT)

 

So, 1_INPUT is the field where I would like to select multiple values, 2&3 are single-selects, and then the KPI. Would this be possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Getting one KPI to connect to a list of selected values

HI @Anonymous,

 

Could you please share a bit more about the error message with your formula?

Further, could you please share more details about the CustomerID_INPUT that you provided? Is it a table?

 

I think there is something wrong with the formula that you provided. The Concat function is used to concatenate the result of a formula applied across all the records of a table, the standard formula of the Concat function as below:

Concat( Table, Formula )

More details about the Concat function, please check the following article:

Concat function

 

I assume that the CustomerID_INPUT that you provided is a Table, and there is a column called CustomerID within it. You want to concatenate CustomerID column values within the CustomerID_INPUT table.

 

In order to concatenate CustomerID column values within the CustomerID_INPUT table, please take a try with the following formula:

Concat(CustomerID_INPUT,CustomerID&"#")

 Note: Don't miss the comma (,) within above formula.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Re: Getting one KPI to connect to a list of selected values

So, to further clarify, when I now choose 4 values from 1_INPUT, only one of them get written back to the sql-table together with the KPI. What I am searching for is that all 4 values get written back with distinctive ID`s.

Community Support Team
Community Support Team

Re: Getting one KPI to connect to a list of selected values

Hi @Anonymous,

 

Could you please share a bit more about your scenario?

Do you want to pass multiple values (on your side, it is 1_INPUT) from an app to a flow, and create one record within your SQL Table for each value?

Could you please share more details about the 1_INPUT, 2_INPUT, 3_INPUT and KPI_INPUT?

 

I suppose that the 1_INPUT is a Combo box control, the 2_INPUT&3_INPUT is a Dropdown control and the KPI_INPUT is a Text input control, is it true?

 

If you want to passed multiple values from an app to a flow, I afraid that there is no direct way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider take a try to concatenate multiple values into a string with "#" as a separator using Concat function, then pass this concatenated string to a flow. Wihtin the flow, you could split the concatenated string value using a Split function based on the specific separator.

 

I assume that you want to pass multiple values (on your side, it is 1_INPUT) from an app to a flow, and create one record within your SQL Table for each value, I have made a test on my side, please take a try with the following workaround:

 

App configuration:13.JPG

 

14.JPG

 

Set the OnSelect property of the "Pass to flow" button to following formula:

'20180904_case8'.Run(
Concat(ComboBox1.SelectedItems,Value&"#"), /* <-- concatenate multiple values into one string value */
Dropdown1.Selected.Value,
Dropdown2.Selected.Value,
TextInput1.Text
)

 

Flow configuration:15.JPG

 

Within "Compose" action, Inputs field set to following formula:

split(triggerBody()['Compose_Inputs'],'#')

Within "Filter array" action, click "Edit in advanced mode", type the following formula:

@not(equals(item(), ''))

Within the "Insert row" action, INPUT1_Value field set to following formula:

item()

INPUT2_Value field, INPUT3_Value field and KPI_INPUT field are all set to Ask in PowerApps dynamic content.

 

The GIF screenshot as below:Test1.gif

 

 

 

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Please check and see if the following blog would help in your scenario:
https://www.techmikael.com/2017/05/saving-collection-of-images-from.html

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Getting one KPI to connect to a list of selected values

Thanks!

 

I do get an error quite early in the process, when typing in Concat(CustomerID_INPUT&"#"), it says only one argument is presented while 2-3 are expected. Any input?

 

Thanks in advance.

Community Support Team
Community Support Team

Re: Getting one KPI to connect to a list of selected values

HI @Anonymous,

 

Could you please share a bit more about the error message with your formula?

Further, could you please share more details about the CustomerID_INPUT that you provided? Is it a table?

 

I think there is something wrong with the formula that you provided. The Concat function is used to concatenate the result of a formula applied across all the records of a table, the standard formula of the Concat function as below:

Concat( Table, Formula )

More details about the Concat function, please check the following article:

Concat function

 

I assume that the CustomerID_INPUT that you provided is a Table, and there is a column called CustomerID within it. You want to concatenate CustomerID column values within the CustomerID_INPUT table.

 

In order to concatenate CustomerID column values within the CustomerID_INPUT table, please take a try with the following formula:

Concat(CustomerID_INPUT,CustomerID&"#")

 Note: Don't miss the comma (,) within above formula.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,169)