Hello,
I am trying to create an Edit.from button, that the will be used only for the the SharePoint list creators not all uses
I am trying to use the below function
Display mode= If(User().email=createdby.email,DisplayMode.Edit,DisplayMode.View)
The problem that I can not fetch the createdby.email from the sharepoint list to use it for this button . also I can use this formula to created filter for ant filed in the created form
Solved! Go to Solution.
Try Display mode=
can do this a few ways. How do you navigate to the edit Form?
If you are coming from a gallery I would put a Set(Varemail,ThisItem.'Modified By')
Then in you Edit button use
If(User().email=Varemail,DisplayMode.Edit,DisplayMode.View)
If you are not getting this way that on teh edit form I would have the source created by column hidden and use
If(User().email=DataCardValue?.Text,DisplayMode.Edit,DisplayMode.View)
Try Display mode=
can do this a few ways. How do you navigate to the edit Form?
If you are coming from a gallery I would put a Set(Varemail,ThisItem.'Modified By')
Then in you Edit button use
If(User().email=Varemail,DisplayMode.Edit,DisplayMode.View)
If you are not getting this way that on teh edit form I would have the source created by column hidden and use
If(User().email=DataCardValue?.Text,DisplayMode.Edit,DisplayMode.View)
Hi @Karim77 :
Do you want to change the mode of the form by selecting the button?
Do you want the creator of the record to be able to modify the form?
First, let me explain what 'Create by' field is.
'Create by' is a standard field in a SharePoint list, which records the creator of the record.
Second, the key to getting a button control to change the form mode is the EditForm function.
I've made a test for your reference:
My data source:'List A'
1\Add a gallery(Gallery7) This gallery is used to select the records we want to display in the form
Items:
'List A'
2\Add a Display form(Form5)
DataSource:
'List A'
Item:
Gallery7.Selected
3\Add a button
If(
User().Email = Gallery7.Selected.'Created By'.Email, /*Determine if the current user is the creator of the record*/
EditForm(Form5), /*Switch the form to edit mode*/
ViewForm(Form5) /*Switch the form to display mode*/
)
Best Regards,
Bof
User | Count |
---|---|
230 | |
102 | |
98 | |
56 | |
33 |
User | Count |
---|---|
282 | |
112 | |
109 | |
64 | |
63 |