Hi all, I need to update two columns of my Sharepoint list based on the data in Sharepoint form. The form submits and updates all the columns which are mapped to the form except two column which gets data from comboboxes. Could you please check my statement below, not sure whats wrong here
Patch('SharePontListName', EditAllNewListForm.LastSubmit, {'Allocated Person': Combobox1.Selected.'User Name'}, {'Allocated to': varUserSelected});
The underlined ones are the sharepoint list columns I want to update . I am writing this statement in the "OnSuccess" property of "EditAllNewListForm" so that once the form updates all the items successfully, these two columns are updated at the end/
Any other workaround to achieve this?
TIA
@kzaidi
A few things
Code should look more like this. you only need 1 set of { } with a comma separating each thing you want to add to a single row
Patch('SharePontListName',
EditAllNewListForm.LastSubmit,
{
'Allocated Person': Combobox1.Selected.'User Name',
'Allocated to': varUserSelected
}
);
other thing with sharepoint as a data source, sometimes 'column name' doesnt work in patch and you need to change it to column_x0200_name
let me know how you go
Thank @BlessedCobba ,
I tried this one too but it says that function Patch has some invalid arguments, Its so annoying cos apparently everything looks okay
is there a red underline under anything specific?
can you paste in a screenshot?
Hi@kzaidi,
Based on the issue that you mentioned, do you want to patch Combo Box selected to 'Allocated Person' and 'Allocated to'?
Could you please tell:
1). what the column type of these two columns, are they Choice or Person?
2). how you set the Items property of the Combo Box and how you create the varUserSelected?
Please do answer the above question.
If the 'Allocated Person' is a Choice type, I think you should use a formula as below to replace "Combobox1.Selected.'User Name'":
{'Allocated Person': {Value: ComboBox1.Selected.'User Name'}}
Regards,
Qi
User | Count |
---|---|
119 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
140 | |
108 | |
83 |