Hello,
I am trying to create a new row in my sharepoing list. This is reagarding the users management accessments.
The list have two fields the name (of the users) and choice with different access types (admin/viewer,...). The name is a input text and the choice is a dropdown. I am trying to add a new row but I am strugling with it.
I suspect the problem is based on the way I am showing my dropdown values. The item of the AccessDropdown is equal to:
Distinct(Sort(UserAccessManagement,AccessType.Value),AccessType.Value)
The sharepoing list is the UserAccessManagement and the Access Type is the multiple tipoligies (admin/viewer...). I have given this instrunction to the dropdown to shown only one option of which access type (if there were two adminds on my sharepoing it would be displayed "Admin").
Because of this funciton I have to use
AccessDropdown.Selected.Result
instead of
AccessDropdown.Selected.Value
However when I try to patch the new value to the Sharepoing list I have a problem regarding its structure. Error "The type of argument "AccessType" does not match the expected type "Record". The function used was:
Patch(UserAccessManagement, Defaults(UserAccessManagement),{Title: GiveAccessToUser.Text, AccessType: AccessDropdown.Selected.Value})
I also tried by this way without success:
Patch(UserAccessManagement, Defaults(UserAccessManagement),{Title: GiveAccessToUser.Text, AccessType: { '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference" Id:1, Value:"Admin" } })
Do you have any ideas? What I am doind wrong?
Thanks in advance.
Pedro Pereira
Solved! Go to Solution.
Hi @PedroPereira ,
May I know why you want to use a customized dropdown control? Since you said that AccessType is a choice column, then you could set the options from the SharePoint list side. Just give the options of what you need "admin/viewer,..." without duplicated values. Then in PowerApps Edit Form, this choice column would automantically display as a Dropdown control with the options you give in SharePoint.
Regards,
Mona
Hi @PedroPereira ,
May I know why you want to use a customized dropdown control? Since you said that AccessType is a choice column, then you could set the options from the SharePoint list side. Just give the options of what you need "admin/viewer,..." without duplicated values. Then in PowerApps Edit Form, this choice column would automantically display as a Dropdown control with the options you give in SharePoint.
Regards,
Mona
Hello,
What a waste of time I have done... And the solution was as basic as you have said. Thank you for your help 🙂
Regards,
Pedro Pereira
User | Count |
---|---|
187 | |
105 | |
89 | |
45 | |
43 |
User | Count |
---|---|
237 | |
105 | |
104 | |
66 | |
66 |