Webforms are wonderful things in PowerApps portals. It allows you to design wizard control providing user with multiple steps to complete an operation.
And one of the wonderful things with WebForms in PowerApps portals is to maintain sessions. Say a Webform have three steps – Step 1, Step 2 and Step 3.
Say a portal user named Joe starts a webform and fills in till step 2 and then leaves the portal. When Joe again login to the portal and start web form, he will start from Step 2 instead from beginning, basically from where he left off. That’s an awesome feature.
Now the first question – Does webform always maintain session? The answer is No. It depends on the setting of the WebForm.
There is a field on the webform – “Start New Session on Load”. If you set this to Yes, it won’t save user’s session. If set to No, then the user’s session shall be saved.
Now the next question – Where are session information saved? How does Portal load session information specific to user?
Well, it’s pretty simple. On the WebForm record, there is “Sessions” tab. As you can see from the below screenshot, we can see the session saved for my login.
It’s no brainer that Portal loads session information from this record. Before we close this blog, let’s see what’s there on the session record.
As you can from the above screenshot, the portal user information and the entire step journey is stored in this record. And guess what, the step the user was last in, is stored in the Step History field. Below is the step history for one my sessions in json viewer.
As I highlighted, the IsActive: true is the step the user was last in and hence when the same portal user browse the webform, the active step shall be loaded.
And for some reason if a portal user request to start afresh a webform session, all you need to do is identify the session record for the portal user and he/ she shall start afresh.
Hope this helps!
Our product offerings:
CRM-Sharepoint Attachment uploader and metadata manager (http://www.xrmforyou.com/sharepoint-integrator.html)
Role based views for Dynamics 365 (http://www.xrmforyou.com/role-based-views.html)
Record Cloner for Dynamics 365 (http://www.xrmforyou.com/record-cloner.html)