cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanWill
Helper I
Helper I

Direct link to a specific advanced form step

Hello together, 

 

I've got a question about advanced forms. In our case we want to have a direct link to the second advanced form step. 

 

Our setup is the following (but with more steps after the second one)

 

Step1: View Article Information

Form Mode: Readonly

 https://1234567890.powerappsportals.com/form/?id={recordid}

 

Step2: Insert Order Information

Form Mode: Insert

https://1234567890.powerappsportals.com/form/?id={recordid}&?stepid={step2-id}&sessionid={sessionid}

 

Right now I can only access the second step if I use the Next-Button, as I would usually do. 

 

Now I have the requirement to create a permanent link that directly opens the second step. There should be created a new sessionid automatically. If I try to access the second the like this:

https://1234567890.powerappsportals.com/form/?id={recordid}&?stepid={step2-id}

I`ll end up in step 1. 

 

Is this possible to achieve this? Please feel free to ask if anything is unclear.

 

Thank you for your ideas! 

 

 

3 REPLIES 3
chleverenz
Super User
Super User

Hi @JanWill ,

well, this is unsupported for a couple of reasons but the main reason is, that you can have conditional steps so you never know what the second step is 🙂

Buuuut: we did this in former times with adx. What we did was to create all steps by code. I just had a look to the portal tables and did not see the webformsessionsteps. Instead, i saw a jsonfield in that table. As far as i remember, we creted all steps (so we created history 🙂 ) and were able to navigate more than one step back (our issue was the backnavigation). (i will have a look on the old code tomorrow)

 

We just went live with a PowerAppsPortals solution in order to replace the outdated adx version. 

We decided not to use advanced forms anymore for this specific project. We jused standard forms and did the navigation by ourselves (which is done via setting the url). So, in fact we have basic forms where i pass the id of the data in and upon finishing one form, we navigate to another page (the navigation is not done via the success setting in the basic form as we use the webapi to store the data and navigate via window.location.href=<new location> by code)

 

So, my recommendation would be: is it really neccessary to use advanced forms or can it be done by using just three or four forms and do the navigation either by success settings or javascript navigation?

 

Hope this helps a little bit,

  Christian

 

PS if you really have to use advanced forms, may be try to navigate manually and see what happend to the adx_webformsession table. May be this gives you insights. As i said: i did not give you the tip to do so 🙂

chleverenz
Super User
Super User

Hi @JanWill ,

had a look to the old code. There was nothing like stephistory, we stored the information in the jsonobject. So, pretty ugly 🙂 - not supported at all but worked in the old adx version. Can be changed any time without notice.

Actually, the json was an array of steps with the link to the previous one containing the stepnumber and the id, logicalname and primarykey of the record which is worked on. As you make an insert in the second step, may be an empty guid or nulls in that field do the job. Who knows 😞 

 

newsessionobject["adx_stephistory"] = "[{\"ID\":\"<guid of the first webformstep>\",\"Index\":0,\"IsActive\":null,\"PreviousStepID\":\"00000000-0000-0000-0000-000000000000\",\"ReferenceEntity\":{\"ID\":\"" + entitywhichisworkedon.Id.ToString() + "\",\"LogicalName\":\"<logicalnameofentityworkingon>\",\"PrimaryKeyLogicalName\":\"<keyfieldnameinentityworkingon>\"}},{\"ID\":\"<guid of secondstep>\",\"Index\":1,\"IsA...

 

Can not be repeated too often: completely unsupported and should not be used at all.

 

Better go for another approach or leave out the first step 🙂 (ok, it will be there for a reason)

 

Hope this helps and is never used 🙂 ,

  Christian

JanWill
Helper I
Helper I

@chleverenz 

Hi Christian, 

thank you very much for sharing your information! 

 

The takeaway I can get from this is

- there isn't a standard compatible way of implementing this

- you shouldn't try to implement a work around solution if not 100% necessary

- achieve the functionality by using seperated basic form that are linked together by a custom/manual solution

 

I'll post an update, if I found a fitting solution for my situation.

 

Thank and best regards,

Jan

 

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,390)