I have an app that teachers use to log intervention attempts.
The interventions are populated from a combo box. I also have an input text box in case the needed intervention is not in the list.
I have a text box that allows user to see selected items, I then patch the text box contents.
The text box is calculated with:
Concat(cbStrengthSelections.SelectedItems, 'Strengths (Strengths)' & "; "&iptAddStrength.Text)
cbStrengthSelections is the combobox with stock items
iptAddStrength is the text box where user adds custom items
This works perfectly unless the user does not select anything from the combo box (cbStrengthSelections) but only inputs into iptAddStrength.
In this case, I would only want to display the data of iptAddStrength.
I was thinking about using an If(isBlank... but wasn't sure if that was the most efficient solution.
Any ideas? Thx for your consideration.
Solved! Go to Solution.
Hi@slhangen,
Based on the issue that you mentioned, do you want to display the iptAddStrength text only if there is no selected within the cbStrengthSelections?
Could you please tell me that how you set the Items property of the Combo Box?
Combine that with your description, I assume that the column type you fill the Combo Box is a Text type.
I have a test on my side, please take a try as below.
Set Items for cbStrengthSelections:
DataSource.TextColumn
Set Text/Default for the Label/TextInput:
If(
IsEmpty(cbStrengthSelections.SelectedItems),
iptAddStrength.Text,
Concat(
cbStrengthSelections.SelectedItems,
TextColumn & ";" & iptAddStrength.Text
)
)
Hope could help you.
Regards,
Qi
With({wstrengths:'Strengths (Strengths)' & "; "&iptAddStrength.Text
wcbo:cbStrengthSelections.SelectedItems},
If(
IsBlank(wcbo
);wstrengths; Concat(wcbo; &"; "& wstrengths
)
)
)
Thx sir, getting multiple errors.
I just want to populate label with following contents:
cbStrengthSelections (combobox with stock items) and/or iptAddStrength (text box where user adds)
Thx again for your help.
Getting following error for 'Strengths (Strengths)':
Not sure what this means. I am new to the With function.
I think it means PowerApps doesn't recognize your column name.
Hi@slhangen,
Based on the issue that you mentioned, do you want to display the iptAddStrength text only if there is no selected within the cbStrengthSelections?
Could you please tell me that how you set the Items property of the Combo Box?
Combine that with your description, I assume that the column type you fill the Combo Box is a Text type.
I have a test on my side, please take a try as below.
Set Items for cbStrengthSelections:
DataSource.TextColumn
Set Text/Default for the Label/TextInput:
If(
IsEmpty(cbStrengthSelections.SelectedItems),
iptAddStrength.Text,
Concat(
cbStrengthSelections.SelectedItems,
TextColumn & ";" & iptAddStrength.Text
)
)
Hope could help you.
Regards,
Qi
User | Count |
---|---|
252 | |
106 | |
96 | |
51 | |
39 |