I've tried a few options by reading through a lot of these forum post but can't find anything that works. It could be as simple as me not knowing what the formula entry needs to be to identify the form creator.
This is what I currently have (not working):
If(User().FullName='Created By_DataCard1',EditForm(EditCarForm);Navigate(EditDetailsScreen,ScreenTransition.None),DisplayForm(DisplayCarForm);Navigate(DisplayDetailsScreen,ScreenTransition.None))
Any advice will be greatly received
Hi @Chris-Dale ,
Could you please share more details about the data source you used within your app? Is it a SP list?
Could you please share a bit more about the 'Created By_DataCard1' that you mentioned? Is the Data card within your Edit form?
Further, do you want to edit the selected item from your Gallery if the current user is the creator of the record (from) when you press the "Navigate" button from your Gallery screen?
I assume that the data source you used within your app is a SP List, and you want to edit the selected item from your Gallery if the current user is the creator of the record (from) when you press the "Navigate" button from your Gallery screen.
Based on the formula that you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Navigate" icon button within your BrowserGallery screen to following:
If( User().FullName = Gallery1.Selected.'Created By'.DisplayName, EditForm(EditCarForm);Navigate(EditDetailsScreen, ScreenTransition.None),
DisplayForm(DisplayCarForm);Navigate(DisplayDetailsScreen, ScreenTransition.None) )
Note: I assume that you use a Gallery control to list all records of your SP list within your app.
If the data source you used within your app is not a SP list, please consider take a try with the following formula:
If( User().FullName = Gallery1.Selected.'Created By', EditForm(EditCarForm);Navigate(EditDetailsScreen, ScreenTransition.None), DisplayForm(DisplayCarForm);Navigate(DisplayDetailsScreen, ScreenTransition.None) )
In addition, if you do not use a Gallery to list all records of your data source, please consider take a try with the following formula:
If( User().FullName = ItemRecord.'Created By', /* <-- ItemRecord represents the record you want to edit or display */ EditForm(EditCarForm);Navigate(EditDetailsScreen, ScreenTransition.None), DisplayForm(DisplayCarForm);Navigate(DisplayDetailsScreen, ScreenTransition.None) )
Best regards,
Thanks for posting in the community @Chris-Dale - can you review the above reply and update the thread if it was helpful?
Thank you,
User | Count |
---|---|
135 | |
132 | |
79 | |
75 | |
71 |
User | Count |
---|---|
210 | |
197 | |
69 | |
62 | |
53 |