Loading...

Pass variable from one form to the next.

Pass variable from one form to the next.

  • This topic is empty.
Viewing 8 reply threads
  • Author
    Posts
    • #5124
      Anonymous
      Anonymous
      Participant

      Also I need instructions to allow the user to keep adding items that are attached to the first list. For example, List 1 contains the general information for the request, and List 2 would be the items associated with the item generated in List 1. Once the user has submitted one item it should give the option to ask the user 'Would you like to add additional items to this request?'

      Any help on this would be greatly appreciated. Thank you. 

    • #5121
      Anonymous
      Anonymous
      Participant

      Hi Anthony

      I would assume we use qListForm as “NewListItem” type for creating a new List Item thus having a new List Item ID and we want to pass this to anther form with the ID prepopulated. Please follow the steps below to make it work:

      1. On the first form, configure ViewedList and DisplayFields property, set Form Type as “NewListItem”

      2. On the Display tab, specify Next Page Url property to point to the second form page which will receive the new ID and make sure you pass the new ID as parameter using field expression, such as mypage.aspx?MyID=<%ID%> (see screenshot below)

      3. On the second form, configure ViewedList and DisplayFields property, make sure the field that receives the new ID is configured of type Consume Value from a Http Request and specify the Parameter Name, for exampe, “MyID”.

      So hope this helps.

    • #7102
      Anonymous
      Anonymous
      Participant

      Hi Anthony

      This requirement can be accomplished with qListForm. Initially I thought about using Custom Actions which provides the most flexible and powerful means to add behaviors. However it is much involved with custom coding and may not generate the desired result. So my suggestion is to follow a simple workaround.

      As I posted earlier regarding your first question, you would need to have the same settings like that with two pages containing the qListForm. However instead of directing the first page directly to the second page, you would introduce a 3rd page as the middle man. On this page, you would display the message "Would you like to add additional items to this request?" with button "Yes" and "No". Based on the answer, it redirects the page either to the first page to allow user add additional item or to the second page to continue filling out other details of the same item.

      This invovles a little bit HTML code and javascript and it is certainly doable.

      Thanks,

    • #7103
      Anonymous
      Anonymous
      Participant

      Not sure why Xien’s answer came through email but didn’t post. But here’s the solution.

      Hi Anthony

      I would assume we use qListForm as “NewListItem” type for creating a new List Item thus having a new List Item ID and we want to pass this to anther form with the ID prepopulated. Please follow the steps below to make it work:

      1. On the first form, configure ViewedList and DisplayFields property, set Form Type as “NewListItem”

      2. On the Display tab, specify Next Page Url property to point to the second form page which will receive the new ID and make sure you pass the new ID as parameter using field expression, such as mypage.aspx?MyID=<%ID%> (see screenshot below)

      3. On the second form, configure ViewedList and DisplayFields property, make sure the field that receives the new ID is configured of type Consume Value from a Http Request and specify the Parameter Name, for exampe, “MyID”.

      So hope this helps.

    • #3969
      Anonymous
      Anonymous
      Participant

      Can someone point me to an example of after submitting one form and getting an ID, that ID would pass the user to another form and autopopulate a reference field for the ID?

      any help is apprecaited. 

    • #7106
      Anonymous
      Anonymous
      Participant

      Hi Anthony

      This requirement can be accomplished with qListForm. Initially I thought about using Custom Actions which provides the most flexible and powerful means to add behaviors. However it is much involved with custom coding and may not generate the desired result. So my suggestion is to follow a simple workaround.

      As I posted earlier regarding your first question, you would need to have the same settings like that with two pages containing the qListForm. However instead of directing the first page directly to the second page, you would introduce a 3rd page as the middle man. On this page, you would display the message “Would you like to add additional items to this request?” with button “Yes” and “No”. Based on the answer, it redirects the page either to the first page to allow user add additional item or to the second page to continue filling out other details of the same item.

      This invovles a little bit HTML code and javascript and it is certainly doable.

      Thanks,

      not sure why your replies are not getting posted. This all worked, but on the HTML page how do I grab the variable from the URL and place that into a link on a web content editor part? I have this as my link but its not correct obviously…

    • #7067
      Anonymous
      Anonymous
      Participant

      This works great, now I have two follow up questions.

      1) There can be multiple second forms tied to the first form. After you submit the second form I have a page that says ‘Would you like to submit another item?’. How do I grab the specific ID from the query at the top of the page and have that used in a Content Editor Webpart. For example the YES link on the Content Editor webpage has to bring them back the NewItem Form 2 page with the correctID.

      2) Is there a way to have both Form 1 and Form 2 on one page, and as you submit items on Form 2, it would automatically start a new item below, but keep Form 1 the same up top on the same page?

    • #7072
      Anonymous
      Anonymous
      Participant

      Another follow up. How do I grab a variable from qListView and tell it to pass it to the NewFormPage.

    • #7080
      Anonymous
      Anonymous
      Participant

      i would like to know how to do this as well,

      have you had any success with this?

Viewing 8 reply threads

You must be logged in to reply to this topic.