I am a novoice in PowerApp and stuck with the following scenario, require help!
I have 4 different screens/forms associated to a single sharepoint list form.
On click of 'New', first form opens up which will have 3 options for a user to choose - Form1, Form2, Form3.
User selects any one form and is navigated to respective form, where he inputs data and saves the entry.
In this case, how should I write onEdit formula in SharePointIntegration control for 'Edit' to open the respective forms (out of 3) on click of edit icon from SharePoint list?
I have tried setting a variable to update a column value for every item creation like 'FormName' - "Form1","Form2","Form3" and then use a IF statement to navigate to the respective form but it does not work. It always opens the main form (snapshots below).
Please help on how will i navigate to the correct form with onEdit. Thanks in advance!
Main form to navigate to other forms on click of image
SPIntegration - onEdit
Also tried Refresh('DataSource') on AppStart and also onSelect, but no luck!
@Anonymous wrote:Hi @v-xida-msft,
You are right, I have added the FormName column (SLT) in my list and update it's value on onSelect property of Save button from each form: Set(varForm,"Form1"), Set(varForm,"Form2") and Set(varForm,"Form3") and set the default value of FormName to 'varForm'.
I have also set the onVisible property of ParticipantScreen1Edit to EditForm(ParticipantForm1Edit), ParticipantScreen2Edit to EditForm(ParticipantForm2Edit) and so on.
I did try your below solution and it works however, there are still 2 more issues.
1. When an item opens for edit, it still opens the main screen(which has 3 options to choose) and then refreshes and opens the respective form.
2. When I edit an item (say form1 item), it opens it's respective form for edit and when I open another item which was saved from form2, it still opens form1 for edit. When I reload the whole page(sharepoint list) and then select form2 item for edit, it opens the right form, which means it opens the right form every time only on reload of page and not otherwise.
Please help me to get over these issues and thanks a lot for your help so far.
Hi @v-xida-msft,
You are right, I have added the FormName column (SLT) in my list and update it's value on onSelect property of Save button from each form: Set(varForm,"Form1"), Set(varForm,"Form2") and Set(varForm,"Form3") and set the default value of FormName to 'varForm'.
I have also set the onVisible property of ParticipantScreen1Edit to EditForm(ParticipantForm1Edit), ParticipantScreen2Edit to EditForm(ParticipantForm2Edit) and so on.
I did try your below solution and it works however, there are still 2 more issues.
1. When an item opens for edit, it still opens the main screen(which has 3 options to choose) and then refreshes and opens the respective form.
2. When I edit an item (say form1 item), it opens it's respective form for edit and when I open another item which was saved from form2, it still opens form1 for edit. When I reload the whole page(sharepoint list) and then select form2 item for edit, it opens the right form, which means it opens the right form every time only on reload of page and not otherwise.
Please help me to get over these issues and thanks a lot for your help so far.
Hi @Anonymous ,
Do you add a FormName column (Single line text column) in your SP list to store the Form's name within your app?
How do you update the FormName column in your SP list from your app? Could you please share a bit more about the formula?
I agree with your thought almost, but based on the formula that you mentioned, 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 OnEdit property of the SharePointIntegration control to following:
Set( editFormVar, SharePointIntegration.Selected.FormName /* <-- Modify formula here. Please do not use Value() function to convert the FormName value */ ); If( editFormVar = "Form1", Navigate(ParticipantScreen1Edit, ScreenTransition.None), editFormVar = "Form2", Navigate(ParticipantScreen2Edit, ScreenTransition.None), editFormVar = "Form3", Navigate(ParticipantScreen3Edit, ScreenTransition.None) )
Best regards,
For save button's onSelect, I have written "SubmitForm(Form1)" for form1, "SubmitForm(Form2)" for form2 and "SubmitForm(Form3)" for form3.
@Anonymous What you have written on Save Button ?
When a user clicks on 'New' form, the main screen (image uploaded earlier) will open. User will be navigated to respective forms on click of image. Below are the 3 different forms.
Form1
Form2
Form3
User saves the respective form details independently on each form. Now, if a user wants to edit an item from sharepoint, on click of edit, how will it be redirected to respective forms? I mean, if an item is saved from form1, it has to open form1 for edit. If an item is saved from form2, it has to open form2 for edit and so on. Please advise.
Can't you place a button on your screen? which navigates you to your screens ?
Why you want to use onEdit property only?
WarrenBelz
110
Most Valuable Professional
MS.Ragavendar
77
stampcoin
52