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?
TL;DR: you can manipulate the Web Form Session 😉
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:
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.
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.
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?
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?
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.
By default, this field is auto-populated by the system, I've never tried over-writing it myself, but I think it should work.
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.
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.
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
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.
Read all about the most recent blogs in the community!
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest News & Events in the community!