Hi Guys,
I have created multiple forms and connected them through workflow I am able to go to next form when I click next(used transaction to="form2) but the values are not going from one form to another. Can you please give me a solution how can I access form 1 values in form2.
Hi @Chiru1307 ,
To transfer values from Form1 to Form2, you can use the send attribute within the <Step> tag that defines Form2. This attribute specifies which fields or data from Form1 should be passed forward when navigating to the next step. Here’s an example of how to configure it:
<Step icon="Default" name="Form1" posX="427" posY="9">
<Approval name="Form1" owner="ref:launcher" return="field1, field2, field3"/>
<Transition to="Form2"/>
</Step>
<Step icon="Default" name="Form2" posX="427" posY="9">
<Approval name="Form2" owner="ref:launcher" return="field1, field2, field3" send="field1, field2, field3"/>
</Step>
In this example, field1, field2, and field3 represent the names of the fields from Form1 that you want to make available in Form2. Make sure these field names exactly match the ones used in Form1. Once passed, these values can be accessed and used in Form2
Hi @Arun-Kumar
The value is getting passed but
I am getting null when I am using this
Application app = context.getObjectByName(Application.class,selectedApp);
selectedApp is the field name of form 1
refer these, https://community.sailpoint.com/t5/Technical-White-Papers/Form-Models/ta-p/78498 and Form Models
What is the type of the form field you have used for the selectedApp. If you are using Application (which is SailPoint object reference) and not passing any argument for valueProperty then it returns the id of the object selected on the form.
You can fix your code by using context.getObjectById instead of context.getObjectByName or you can also pass the following argument for the selectedApp field in form 1
<Attributes>
<Map>
<entry key="valueProperty" value="name"/>
</Map>
</Attributes>
You might be getting the id not the name. Are you using log4j to do debugging of your code? You should be using log4j debug statements to understand exactly what is happening.
Hi @SanjeevIAM ,
yes, the value is passing as id , I have fixed it like you said. But while I doing the same thing in form3. I am getting this error
Class: Application not found in namespace
Application app = context.getObjectById(Application.class,selectedApp);
That’s because you do not have import statement. Just add the following in your code.
import sailpoint.object.Application;
Not sure about your requirement and why you are getting the application object? Do you need to display any application attributes on the form
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.