cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mariaschm
Frequent Visitor

Granting user access to its own row in dataverse table

We want to automatically grant office users access (read and write) to their own dataverse row. So the office user should be assigned to own the row of the table, which corresponds to their name. How is the code for the unbound action, grantaccess? 

The picture shows that we have one entry which is the full name on the left and we want to automatically assign the user that corresponds to this full name.

mariaschm_0-1635170594794.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @mariaschm :

Do you want to replace Ower in the table with the value in the FullName field? Something like:

vbofengmsft_0-1635401714763.png

to

vbofengmsft_1-1635402717713.png

If so,I've made a test for your reference:

1\Create a canvas and add Users and Your Data table as datasource:

2\Add a button and set it's OnSelect property to:

 

ClearCollect(TheSource,Homes.Home); /*Homes is my custom table*/ /*Home is the Guid column*/
ForAll(TheSource,
  Patch(
        Homes,
        LookUp(Homes,Home = TheSource[@Home]),
        {Owner:LookUp(Users,'Full Name' = LookUp(Homes,Home = TheSource[@Home]).Name)}
))

 

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @mariaschm :

Do you want to replace Ower in the table with the value in the FullName field? Something like:

vbofengmsft_0-1635401714763.png

to

vbofengmsft_1-1635402717713.png

If so,I've made a test for your reference:

1\Create a canvas and add Users and Your Data table as datasource:

2\Add a button and set it's OnSelect property to:

 

ClearCollect(TheSource,Homes.Home); /*Homes is my custom table*/ /*Home is the Guid column*/
ForAll(TheSource,
  Patch(
        Homes,
        LookUp(Homes,Home = TheSource[@Home]),
        {Owner:LookUp(Users,'Full Name' = LookUp(Homes,Home = TheSource[@Home]).Name)}
))

 

Best Regards,

Bof

 

mariaschm
Frequent Visitor

Hi @v-bofeng-msft,
thank you for your answer. That is exactly what i mean, but I do not want a button On Select property to do it, but automatically within a flow. Any suggestions?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,103)