Hi,
I have combobox office 365user. When I use patch command, it defaults to null and does not retain the name value. I need it so that I can pull lookup employee id from my sharepoint list. Is there a way that combobox retain the value once patch comman
Solved! Go to Solution.
Hi @derrickd ,
Which data source do you use in your app? Is it a SP List?
Which type column do you use to store the ComboBox selected value? Could you please share more details about the
Further, do you use Patch function to patch data back to your data source?
If you want the ComboBox to remain the selected value after executing Patch function, please take a try with the following workaround:
1. If the ComboBox connects to a Person field in your SP List:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
SubmittedRecord.PersonField
2. If the ComboBox's Items property set to Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}) formula, and you used a Text column in your data source to store the ComboBox Selected value:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
LookUp(
Office365Users.SearchUser(),
DisplayName = SubmittedRecord.TextTypeColumn
)
3. If the ComboBox's Items property set to Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}) formula, and you use a Person type column in your SP list to store the selected value:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
LookUp(
Office365Users.SearchUser(),
DisplayName = SubmittedRecord.PersonColumn.DisplayName
)
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @derrickd ,
Which data source do you use in your app? Is it a SP List?
Which type column do you use to store the ComboBox selected value? Could you please share more details about the
Further, do you use Patch function to patch data back to your data source?
If you want the ComboBox to remain the selected value after executing Patch function, please take a try with the following workaround:
1. If the ComboBox connects to a Person field in your SP List:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
SubmittedRecord.PersonField
2. If the ComboBox's Items property set to Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}) formula, and you used a Text column in your data source to store the ComboBox Selected value:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
LookUp(
Office365Users.SearchUser(),
DisplayName = SubmittedRecord.TextTypeColumn
)
3. If the ComboBox's Items property set to Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}) formula, and you use a Person type column in your SP list to store the selected value:
Set the OnSelect property of the "Submit" button to following:
Set(
SubmittedRecord,
Patch(...) /* <-- Type your Patch formula */
)
then set the DefaultSelectedItems property of the ComboBox to following:
LookUp(
Office365Users.SearchUser(),
DisplayName = SubmittedRecord.PersonColumn.DisplayName
)
Please consider take a try with above solution, check if the issue is solved.
Best regards,
Hi @v-xida-msft
Thanks for your solution - I was hoping you might be able to help me with a similar problem I'm encountering.
Below is a picture of my patch function. It is working in its entirety except the combobox field (Approved Resources, top right) isn't saving the selected values when the save button is pressed (on select = patch, which is the function shown)
When I press patch, the values for the other non-combobox fields are saved and a new record is produced below (as intended). Note that my patch function successfully collects the values from the combobox, it just doesn't show them in the field (example, "3 selected") when I press my patch button.
If you have any insight that would be helpful. Thank you!
Best,
Steven
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
82 | |
50 | |
37 |
User | Count |
---|---|
288 | |
241 | |
123 | |
75 | |
56 |