web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Navigate to specific S...
Power Pages
Unanswered

Navigate to specific Step in the web form - How to modify session url

(0) ShareShare
ReportReport
Posted on by 27

Hi,

I have four steps in the web form. I created a functionality to save the url of the session when user leave that form in the middle Save as draft and want to create another form by enabling start new session on Load. Now if supervisor want to review from Step 1 in the same form, How can I modify session url to navigate him to the first step in the web form? the url taking me to the end step or where the other user left but I'm not able to take the user back to step 1. Any advice?

 

Thanks,

-RI

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    TL;DR: you can manipulate the Web Form Session 😉

     

    Long answer:

     

    Hi, every time time you start a session, there is a special record created in your Dataverse for a table called Web Form Session. 

    This record is related to your Web Form, and also contains a reference to the table/id of your main record (as string and not lookup).

    This also contains the current step and all transition the user went through (step history). You can manipulate the Current Step / Current Step Index via Plugin/Workflow to set your record to be in a specific step.

     

    Below snapshot is very old but can give you an idea:

    OliverRodrigues_1-1611869747697.png

    ATTENTION

    something very important here, if your Web Form contains conditions/branches, this can make your web form all confused, this is because the transition path has been disrupted, so if the user is trying to go back/forth they might have issues. In simple words, if you have conditional branches, please avoid this technique, or maybe you will need to read all the step history to understand where the user is coming from and setting a new history manually (that would be probably very complicated).

    Finally, not sure how you are planning to manipulate this, but don't use the Portals Web API to manipulate Portal tables, this is not supported and if you get it working, it might stop working in the future. Look for server-side coding/workflow here (sync/real-time as you want to refresh the cache instantly).

     

     

    Sorry about the long answer.

  • RILocal Profile Picture
    27 on at

    Thank you, I want to move to step1 from the last step when I hit Previous(Review) button.   

    I was looking into session history and step ids. I checked by passing step1 PreviousStepID along with Reference Entity Ids in the URL but it landed on the same step where I left the web form step. I do like the workflow idea, Do you have any information on how to handle the session history using workflows? and what exactly need to be pass in the URL to get to the specific step?

    Another workaround I think of is to use a hidden textbox and condition step on the last step (Use two NextButton actions - Review - Done). Review takes the user to the Step1 and Done basically submit the form. Any thoughts? I know that it may create inconsistent step no.s I may need to hardcode and a chain of history in the session.

     

    Thanks,

    -RI

  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Your scenario looks much simpler than I thought then.

    Each Web Form Step contains a reference to the next and previous step. Have you tried changing the previous step for your last step? to point it to the 1st step?

  • RILocal Profile Picture
    27 on at

    Hi, I checked the previous step option and found only "Move Previous Permitted" checkbox that even takeaway previous step functionality. Is there any other option that allow me to set the Previous step like next step?

     

    Thanks,

    -RI

  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Sorry, I forgot about that. The field does exist, but it's hidden.

     

    You can go to your solution and add the table Web Form Step, and just add the form Information, no need to add any field. Now you can add the field into the form manually.

    OliverRodrigues_0-1612254186647.png

     

    By default, this field is auto-populated by the system, I've never tried over-writing it myself, but I think it should work.

  • RILocal Profile Picture
    27 on at

    Hi, Thank you, this is interesting, I was able to add this field to the form through custom settings and now I can see the field on each step settings and this field have lookup to set the step just like Next step However setting any step in the field having no impact. I also check\uncheck the previous permitted option but it still display the previous button on the steps.

  • oliver.rodrigues Profile Picture
    9,368 Most Valuable Professional on at

    Hi, yeah I tested here myself and it seems that that field is ignored. Probably that's why it's not placed in the form.

     

    I will try to test in the following days, I think the way to go is via Web Form Session. If I have any updates I will let you know.

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    If all you are looking for is another user to review, wouldn't it be easier to create a separate Web From that is only accessible to a 'reviewer' Web Role.  Basically you would duplicate what you have in your main Web Form, but you wouldn't have to worry about sessions of the other user etc

  • RILocal Profile Picture
    27 on at

    Hi Fubar, I have some custom fields and each step is heavy with the js coding that I don't want to replicate and the reviewer also need to have the form open in Edit\Insert mode to make changes as they are going to review it. So I decided to use one web form but have a ability for the reviewer to navigate to start from step1 to view all steps in the sequence. 

     

    Thanks,

    -RI

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    You don't have a lot of options as the Previous/Next functionality is handled in the backend where we don't have access, and whilst it is based on what is contained in the Web Form Session record you can't easily play with that record. 

     

    The dropdown suggestion doesn't really work (have tried doing this before) if you have any conditional Steps as if the user selects an item that the condition doesn't allow access to they will get an error on the page or stay on the current Step (also end up with lots of chained conditions after each Step).

     

    You can try playing with the Web Forms "Start New Session On Load" field - am a guessing that you currently have this set to No, and this is the setting they have for basic resume later (user closes browser goes back later opens on the correct step).  Problem is that setting it to Yes, puts you back on the first step (that is probably an Insert Step) and it doesn't really do edit (unless the first Step is an Edit Step). 

     

    One thing to remember is that your First user is probably doing an insert/create as the first Step (I am assuming you haven't pre generated it), however your reviewer is really a reader/editor (not a creator).  And this is why I suggest 2 Web Forms one where the first step is an Insert (run this off the Create button) and another where it is an Edit run this off the listview item.  Unfortunately you can't put a Condition as the first Step, so you are forced down the path of duplication (but once the structure is in place most of it is copy and paste or where possible put JavaScript on the Entity Form itself).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard