cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ian_C
Helper II
Helper II

Users to be able to add attachments when creating new entries but prevented from editing entries once added.

Hi, 

so my scenario is that I have a sharepoint list which allows users to raise requests for change to process documents. 

They should be able to raise new entries on the list and add attachments to the list (which requires them to have edit access due to sharepoint). 

 

However once the item is raised they should only be able to edit a comments field all the other fields on the list should be disabled but visible to them. 

 

This is all straightforward and is achievable in PowerApps, however I have two users who need to be able to do all the above plus be able to edit all the other fields e.g. Status, as they are the managers of that whole process

 

So I am thinking is there a way to have two forms on the same Power app (controlled by who is logged on) and have one which has all the fields disabled apart from the comments field, and the other to have all fields available.

 

How do I change the setting in the integration to recognise both forms. 
Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @Ian_C ,

 

Could you please share more details about your scenario? Would you like to let only two of users be able to edit all fields of any record while other users only be able to edit comment field of a record?

 

If so, it is not necessary to use 2 Forms in the Screen. You could leverage If statements in all the data card of a single Form:

 

1\ Set a variable in App OnStart:

Set(varValid, If(User().Email = User1.Email OR User().Email= User2.Email, true, false))

If logged in User is one of that two users, the variable equals true.

 

2\ Set DisplayMode of Comments Data Card to:

DisplayMode.Edit

So everyone would be able to edit this field.

 

3\  Set DisplayMode of EACH Data Card of the Edit Form that only the two users could modify:

If(varValid, DisplayMode.Edit, DisplayMode.View)

So only the two users would be able to edit all fields.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @Ian_C ,

 

Could you please share more details about your scenario? Would you like to let only two of users be able to edit all fields of any record while other users only be able to edit comment field of a record?

 

If so, it is not necessary to use 2 Forms in the Screen. You could leverage If statements in all the data card of a single Form:

 

1\ Set a variable in App OnStart:

Set(varValid, If(User().Email = User1.Email OR User().Email= User2.Email, true, false))

If logged in User is one of that two users, the variable equals true.

 

2\ Set DisplayMode of Comments Data Card to:

DisplayMode.Edit

So everyone would be able to edit this field.

 

3\  Set DisplayMode of EACH Data Card of the Edit Form that only the two users could modify:

If(varValid, DisplayMode.Edit, DisplayMode.View)

So only the two users would be able to edit all fields.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Hi @v-jefferni 

 

the form consists of about 20 datacards

 

  • When creating a new item
    • Only 15 datacards are visible
    • All users should be able to create entries filling in those 15 fields
  • When editing an item
    • All 20 datacards are visible
    • The two adminstrators should be able to edit all 20 fields.
    • All the other users should only be able to edit the comments field, all other fields should be in view only.
  • Finally when viewing an item
    • All fields are visible to all

Many thanks

 

Ian_C
Helper II
Helper II

Hi, @v-jefferni 
So therefore I can use test the form mode and the valid variable and then set the display mode for the data card. 

Thanks

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,487)