Solved

Pass value from a View in SmartForm to Workflow

  • 30 October 2018
  • 8 replies
  • 87 views

Badge +6

I have a SmartForm with 3 views. Let's call these views - View1, View2, View3. Below is what they do:

View1 - This is a listview which is bound to SQL View. This SQL View shows the list of SSIS packages

View2 - This is a listview which is bound to SQL Table. This SQL Table holds Errors returned by SSIS packages

View3- Fields which passes input parameter to SQL Stored Procedure

Button - Start a workflow

 

When a user selects a record from View1, the View2 will display Errors that have occured corresponding to the SSIS packages that are displayed in View1

 

The fields in View3 is populated when you select record in View1 as well. 

 

Now I want to pass the values that are populated in the fields (View3) to the workflow on Button click. 

Is this possible? If so how?


13213i1E42DDFA3F937DF0.png

icon

Best answer by JoshSimmons 1 November 2018, 10:09

View original

8 replies

Hi SnehalRanaCRSP,

 

You could create some variables in the Workflow to hold the information from the fields.

When you set up the rule to start the Workflow on Button click, the variables should appear as fields which you can populate in the Configure popup by dragging the appropriate data from View 3 into them.

 

Kind Regards,

Josh

Userlevel 6
Badge +16

Hi,


 


As mentioned by  @JoshSimmons, you will need a few workflow variables to hold the values that you want to send over the workflow. On the 'start the workflow' action, you can map the controls on view3 to the workflow variables (data fields).


 

Badge +6

Just tried this approach though, the SSIS Package does not execute on button click. I am attaching screenshots:

 

smartForm:

 

Badge +6

Here is the full workflow:

 

Badge +6

I am definitely missing something here. Event if I set the data fields in workflow from the button click, doesn't the workflow itself needs to be mapped to the form fields? I don't see how and where I can reference the text field I have on View 3 in my smartForm

 

Hello,

When you start the workflow while passing in the View3 Fields as Data Fields you are already performing the setting of the Wokrflow Data Fields so you don't need to perform this again in the Workflow.

Try removing the Set Data Fields step as I believe it would be setting the data fields back to blank.

 

Kind Regards,

Josh

Badge +6

Josh,

You are LIFE SAVER!!! IT WORKS LIKE A CHARM!!! It saved my day as I am about to demo this to my client !! 

 

If the variable value is not set at the time of starting the workflow, is there any other way to pass the variable value to the workflow?

 

I have to take a screenshot of a form and pass it to a form variable at the end of the process, this variable value needs to be passed to the workflow, so that I can attach the pdf in the outgoing email.

Reply