Need verbiage to display all selected values of listbox populating collection. Using collection (colIndicators) because it is a multi-screen form.
OnSelect of Next Screen button is:
ClearCollect(colIndicators,
{
colRiskFactorsPersonality:lbRiskFactorsPersonality.SelectedItems.Value,
colGoalsPersonality:lbGoalsPersonality.SelectedItems.Value,
colInterventionsPersonality:lbInterventionsPersonality.SelectedItems.Value,
colRiskFactorsMentalHealth:lbRiskFactorsMentalHealth.SelectedItems.Value,
colGoalsMentalHealth:lbRiskFactorsMentalHealth.SelectedItems.Value,
colInterventionsMentalHealth:lbRiskFactorsMentalHealth.SelectedItems.Value
}
)
I can get first value with:
Concat(colIndicators, First(colGoalsMentalHealth).Value, ",")
How can I get all selections of each colIndicator item?
Thx so much!
Solved! Go to Solution.
Yes...I gave you the formula for it:
ClearCollect(colIndicators,
{
colRiskFactorsPersonality: Concat(lbRiskFactorsPersonality.SelectedItems, Value & ","),
colGoalsPersonality: Concat(lbGoalsPersonality.SelectedItems, Value & ","),
colInterventionsPersonality: Concat(lbInterventionsPersonality.SelectedItems, Value & ","),
colRiskFactorsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
colGoalsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems.Value, Value & ","),
colInterventionsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
}
)
This will give you a collection with one record with 6 columns. Each column will be a comma separated string of the selected items in the corresponding ListBox controls.
I am not entirely sure if you are asking that you want to display all of the items of a particular columns (i.e. colRiskFactorsPersonality) as a comma separated list or if you want to get this in some other way.
If in a comma separated list, you could consider altering your Formula to the following:
ClearCollect(colIndicators,
{
colRiskFactorsPersonality: Concat(lbRiskFactorsPersonality.SelectedItems, Value & ","),
colGoalsPersonality: Concat(lbGoalsPersonality.SelectedItems, Value & ","),
colInterventionsPersonality: Concat(lbInterventionsPersonality.SelectedItems, Value & ","),
colRiskFactorsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
colGoalsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems.Value, Value & ","),
colInterventionsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
}
)
Note, you are assigning a single record to a collection. You can also assign this to a lower-weight variable or even simply use the concat function in your Gallery.
But again, not sure exactly where you're trying to go with it.
I hope this is helpful for you.
I just want to display any choices that are selected. Can be up to 5 per section.
Don't know the verbiage for Concat to get all the items, only the first.
Yes...I gave you the formula for it:
ClearCollect(colIndicators,
{
colRiskFactorsPersonality: Concat(lbRiskFactorsPersonality.SelectedItems, Value & ","),
colGoalsPersonality: Concat(lbGoalsPersonality.SelectedItems, Value & ","),
colInterventionsPersonality: Concat(lbInterventionsPersonality.SelectedItems, Value & ","),
colRiskFactorsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
colGoalsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems.Value, Value & ","),
colInterventionsMentalHealth: Concat(lbRiskFactorsMentalHealth.SelectedItems, Value & ","),
}
)
This will give you a collection with one record with 6 columns. Each column will be a comma separated string of the selected items in the corresponding ListBox controls.
Now I see, thanks so much
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
55 | |
43 | |
35 | |
33 |
User | Count |
---|---|
268 | |
78 | |
75 | |
73 | |
67 |