Hello
I have a label field which is populated by a combo box selection: Concat(S1Combo.SelectedItems, NAME & " " & FIRSTNAME, ",")
How do I set the label default properties to ThisItem.S1Student as well?
At the moment all the Gallery records have the same name! I need to show an individual name (selected from the combobox) for each record in the Gallery.
Thanks in advance for any help
Solved! Go to Solution.
Hi @Englishweb ,
Could you please share a bit more about your scenario?
Do you want to update the Label to the latest saved ComboBox selection value when you patch value to your data source?
I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Save" button to following:
Patch(...); Set(ShowSavedValue, true)
Set the OnChange property of the ComboBox to following:
Set(ShowSavedValue, false)
Set the Text property of the Label to following:
If( ShowSavedValue, ThisItem.Student1, Concat(S1Combo.SelectedItems, NAME & " " & FIRSTNAME, ",") /* <-- Display the selected ComboBox values when you change the ComboBox value */ )
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Try this code. If does not produce the desired result please give examples of what you would like to see.
Concat(S1Combo.SelectedItems, NAME & " " & FIRSTNAME, ",")&ThisItem.S1Student
---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."
Hello @mdevaney
Thanks for your reply, The Gallery records are now individual however, your solution collects all the combo box selections to the text box. I'm trying to update the text box with the last saved combo selection only. (see attached image)
(I Have a ClearCollect button and Patch to datasource)
@Englishweb
If I understand correctly, you want to display the last saved item from the combobox. To do this you need to directly reference the field from your datasource (I assume it is called surname) instead of referencing the ComboBox.
ThisItem.Surname
Hello @mdevaney
& ThisItem.Student1
Not sure if I understand you correctly
The text box : Concat(S1ComboConcat.SelectedItems,PRENOM & " " & NOM,",")& ThisItem.Student1
Student1 is the column header in the Excel datasource that the data is being saved to.
The Combo box has a different data table: ALLSTUDENTS. Its column headers are "PRENOM" "NOM"
Sorry if I'm missing something obvious!
Hello @mdevaney
Many thanks for your patience, I'm sorry if I haven't explained myself clearly.
On its own Concat works great BUT each Gallery record is the same.
ThisItem.Student1 works on 'simple' text box defaults where there is nothing else in the default property.
The problem is that I'm using Concat to pull 2 fields (NOM / PRENOM) from the combo box AND use ThisItem for the same text box.
Perhaps there is a work around for a solution, Is there another connector instead of '&' ?
Hope this helps - I'm very grateful for your time and continued patience!
Hi @Englishweb ,
Could you please share a bit more about your scenario?
Do you want to update the Label to the latest saved ComboBox selection value when you patch value to your data source?
I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Save" button to following:
Patch(...); Set(ShowSavedValue, true)
Set the OnChange property of the ComboBox to following:
Set(ShowSavedValue, false)
Set the Text property of the Label to following:
If( ShowSavedValue, ThisItem.Student1, Concat(S1Combo.SelectedItems, NAME & " " & FIRSTNAME, ",") /* <-- Display the selected ComboBox values when you change the ComboBox value */ )
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
User | Count |
---|---|
222 | |
97 | |
95 | |
55 | |
34 |
User | Count |
---|---|
272 | |
108 | |
106 | |
64 | |
60 |