Keeping data intact while coming back to previous form

I have 2 forms, form1 and form 2. I input data in form 1 and Form 2 is a review form and on pressing back button I am trying to get to form 1 with my data intact. But the data wipes off. HOw to solve

<Step name="Form flow" posX="42" posY="228">
    <Approval name="User" owner="ref:launcher" return="userName, email, employeeNum" send="launcher">
      <Arg name="workItemType" value="string:Form"/>
      <Arg name="workItemDescription" value="Newco_SingleUser_Deactivation"/>
      <Arg name="workItemName" value="User"/>
      <Arg name="workItemForm" value="User_"/>
    </Approval>
    <Transition to="Flow 2"/>
    <Transition to="Add Cancel Message"/>
  </Step>
  <Step name="Flow 2" posX="241" posY="294">
    <Approval name="User request" owner="ref:launcher" return="userName, email, employeeNum" send="userName, email, employeeNum">
      <Form name="Form 2">
        <Section name="Please review all the user details:">     
        </Section>
        <Button action="next" label="Submit"/>
        <Button action="cancel" label="Cancel"/>
        <Button action="back" label="Back"/>
      </Form>
    </Approval>
    <Transition to="Add Success Message" when="approved"/>
    <Transition to="Add Cancel Message" when="!approved"/>
    <Transition to="Single User Deactivation" when="!approved"/>
  </Step>

Hi @ShivangiS ,

Add the below transition to Flow 2 step. When you click the back button, it should navigate to the First Form..

 <Transition to="Add Success Message" when="approved"/>
 <Transition to="Form flow" when="!approved"/>

@Arun-Kumar I tried, the data still wipes off. The empty form comes on pressing back button

Hi @ShivangiS ,

Please ensure that the workflow includes the variables userName, email, and employeeNum
Each variable should be set as editable

  <Variable editable="true" name="userName"/>
 <Variable editable="true" name="email"/>
 <Variable editable="true" name="employeeNum "/>

@Arun-Kumar I have it already defined

Hi @ShivangiS ,

Please share the workflow and form

@Arun-Kumar here

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Workflow PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Workflow explicitTransitions="true" name="User Details">
  <Variable initializer="true" name="transient"/>
  <Variable editable="true" name="userName"/>
  <Variable editable="true" name="employeeNum"/>
  <Variable editable="true" name="email"/>

<Step name="Form 1" posX="42" posY="228">
    <Approval name="User" owner="ref:launcher" return="userName, email, employeeNum" send="launcher">
      <Arg name="workItemType" value="string:Form"/>
      <Arg name="workItemDescription" value="Newco_SingleUser_Deactivation"/>
      <Arg name="workItemName" value="User"/>
      <Arg name="workItemForm" value="User_"/>
    </Approval>
    <Transition to="Flow 2"/>
    <Transition to="Add Cancel Message"/>
  </Step>
  <Step name="Flow 2" posX="241" posY="294">
    <Approval name="User request" owner="ref:launcher" return="userName, email, employeeNum" send="userName, email, employeeNum">
      <Form name="Form 2">
        <Section name="Please review all the user details:">     
        </Section>
        <Button action="next" label="Submit"/>
        <Button action="cancel" label="Cancel"/>
        <Button action="back" label="Back"/>
      </Form>
    </Approval>
    <Transition to="Add Success Message" when="approved"/>
    <Transition to="Add Cancel Message" when="!approved"/>
    <Transition to="Form 1" when="!approved"/>
  </Step>

Hi @ShivangiS

I don’t see fields in form 2. You have just section and buttons. Add fields with same names and try it out once.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.