Good day Everyone
I have a column in my dataverse table CIG_Databases called Technician 1 appointed, this column is populated using choices options called Technician appointed. I have a gallery set up in power apps that I would like to patch to update the selection.
The gallery uses a dropdown with the Item = Choices(CIG_DataBases.'Technician 1 appointed '), with the patch as follows:
ForAll(Filter(AssignTechTable.AllItems,
Tech1toggle.Value = true),
Patch(CIG_DataBases,
ThisRecord,
{'Technician 1 appointed ': Tech1Dropdown.Selected ,
'Technician appointed date': Now()}))
The patch fails due to the section in bold with the error The type of this argument "Technician appointed" does not match the expected type 'Table". Found type "Record".
I have tried adding .Result .Text and .Value with no luck.
Any help would be much appreciated.
Solved! Go to Solution.
The cleanest way to fix this is to use a combobox instead of a dropdown, as the type of ComboBox.SelectedItems is also a table. The controls are very similar, and allows you to selected multiple technicians.
Otherwise you would probably need to store the value of the dropdown in a temporary collection, and use that to populate the column in your patch function.
The cleanest way to fix this is to use a combobox instead of a dropdown, as the type of ComboBox.SelectedItems is also a table. The controls are very similar, and allows you to selected multiple technicians.
Otherwise you would probably need to store the value of the dropdown in a temporary collection, and use that to populate the column in your patch function.
Hi @CrashData ,
Try this
ForAll(
Filter(
AssignTechTable.AllItems,
Tech1toggle.Value = true
),
Patch(
CIG_DataBases,
ThisRecord,
{
'Technician 1 appointed ': {Value:Tech1Dropdown.Selected.Value},
'Technician appointed date': Now()
}
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks so much @KvB1, works like a dream!!!! Changed the input to a combo box pointing to the same choices updated the patch to the ComboBox.SelectedItems you suggested.
Limited the combo box to one selection as well.
Thanks so much, really appreciate the help
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 |
---|---|
188 | |
52 | |
51 | |
34 | |
33 |
User | Count |
---|---|
266 | |
97 | |
84 | |
77 | |
73 |