Search code examples
powerappspowerapps-formulapowerapps-canvas

Powerapps: submit and then going to the last modified folders automatically but i want the current folder and not the last


i have a powerapps application, with two edit screen for one application. So when the first edit_form is ok and submitted, i would like that the user go on the next edit_form of THE CURRENT FOLDER WITH SAME ID OF THE FIRST EDIT FORM. But in fact, if I don't do some modifications on the edit form number 1 and i want to go on the second edit screen.

Here is the problem: The user go on the last folders which has been modified, so this is another folder with another ID ! enter image description here


Solution

  • I have found a solution !

    In fact, i generate a random number in a variable with Set() and Rand() :

    Set(idcourant;BrowseGallery1_1.Selected.ID);;Set(baliseNumber;Rand());;Select(Parent)
    

    Then:

    Patch(QuickCheckEST;First(Filter(QuickCheckEST;ID = idcourant ));{balise:baliseNumber});;SubmitForm(EditForm1);;Navigate(EditForm1_1)
    

    With this formulas, my record is always new and updated with a random number, so when i switch on the edit_screen and and the second edit screen , i can stay on the same record/folder, because my record has been updated and recorded with the random number in the SharePoint List !