You are viewing limited content. For full access, please sign in.

Question

Question

Populating multiple form tables based on selected data

asked on March 21, 2018

Hi All,

 

I was wondering if someone would assist with the below requirement, or direct me towards the solution I am trying to achieve. 

 

Example:

I have a query form that will be used to initiate the initial process. Basically, the query form has all the database lookups it requires to populate the Form Table as per below:

This includes the item name, part number, and the available units. The user then can specify how many are required and enter the price for a total calculation. 

 

What I would like to achieve is the following: 

If the Available field has more than the Required, I would like the data to be pushed into a Form with a Table as Stocked Items:

 

But, if any of the line items Required are not Available, I would like that data to be input into another Non-Stocked Items Forms Table as per below: 

 

 

Is this possible? and if so, how? As then I would like to also use the data to route it correctly as per below:

 

Thanking you in advance,

 

Regards

Ziad

1 0

Answer

SELECTED ANSWER
replied on March 28, 2018

Hi Ziad, as the LF Workflow is splitting the data up between the two Types, Stock and NonStock, I think I would add another Token such as Total that would total the Qty for each type as it was running through the data. I would then send that data back to a Total form on each form at the same time I was passing the Business Process variable for each type. In your Forms workflow I would create an inclusive Condition as you where the condition would test for the value of the Stock and NonStock Total Field. If the value was greater than 0, then follow that path. ie: If StockTotal>0 outflow to Stock Form, if NonStockTotal>0 outflow to NonStock Form. This way either 1 or both of the Forms will be assigned in Forms based on those fields.

0 0

Replies

replied on March 22, 2018

Hi Ziad

I've used LF workflow to accomplish this

Once your Parts Required stage is completed and submitted Insert a Workflow Service Task call a Workflow activity to read the table and parse the data building up Multi Value Tokens for each of the table fields for the Stock and Non-Stock item Forms  and then pass those values back to those forms using Business Process Variables activity.

 

1 0
replied on March 22, 2018

Hi Steve,

 

Thank you so much for this, I believe I have got it to where I want except one part. 

Say there are multiple lines, but some of the lines are available and some are not. I am trying to figure out how to distinguish those in the separate forms? 

 

Currently, if they are available, they go to where they need to, and same if they are all required. 

i.e 

 

But, if one line is in stock and the other is is not, it goes to the is not in stock Inbox. 

Is there some sort of trigger within the Forms you need to set? again, I have the Form Process splitting as well based on conditions? 

I do not think the Form would know where to go if there is no conditions set on a gateway? 

 

Thanks again

Ziad

0 0
replied on March 23, 2018

Hi Ziad

In your workflow above I see a couple issues. Your first Assign Token values should appear before the first "For each Row", otherwise the values are going to get recreated on each loop. You would not have For each Row (item) appear again under your "Yes" / "No" condition, you would just have the Modify Token Activities. Your Business Process Variable statements would only appear outside of the loops as a one time action to create the 2 forms (Stocked or Non Stocked Form) so in your Forms Process you would not have a condition as you have as you are not passing individual lines back to forms, but all of the content for that form in one shot.

There is a lot going on here, if you want to attach your wf I can look at it for you.

0 0
replied on March 25, 2018

Hi Steve, 

 

I have attached the Workflow as a reference for you to review if you have a moment? 

 

I needed to rename the file as I was unable to upload a .wfi file to this thread. please remove the extension ".jpg" at the end of the filename, 

 

Thank you in advance,

Ziad

Retrieve Query Items.wfi.jpg
0 0
replied on March 26, 2018 Show version history

Hi Ziad

Please see the attached

The way this works is that it reads Your initial Form, Creates a set of Tokens for the Stock and None Stock Items, Reads though the table and adds the values to the appropriate Token set (Stock or Non Stock). Once all of the Rows are read, it send the information back to the form. The form for Stock and None Stock tables will then be populated with the data applicable for each. If the Stock and NonStock Tables are in separate Forms in your process, then your condition would be to choose to create a task for that form as there are items to display. If both Tables  are in your initial form then they will be updated by the process below. You will need need a condition as to your Forms workflow above.

Hope this helps

Steve

Retrieve Query Items Revised.wfx.jpg
1 0
replied on March 26, 2018

Thanks Steve, 

 

Appreciate it, will give it a test as soon as possible. 

Thanks again

Ziad

0 0
replied on March 27, 2018

Hi Steve,

 

Just a follow-up, 

I am trying to figure out how the Form process/conditions should look if there are different line items that are available and the ones that are not. How can I pass the information to the correct form in this process? 

As in, if all or some are available = go to stocked form (only the ones that are available)

If some are not available = go to non-stocked form, 

 

Any ideas you can throw would be awesome? 

 

Thank you

Ziad

0 0
replied on March 28, 2018

Hi Steve, 

 

Thanks for that, appreciate it all, managed to get it to work as I wanted it to, basically was having an issue with it populating "Setting business process variables" across the tables and I had a read on the following https://answers.laserfiche.com/questions/122882/Multiple-Set-Business-Process-Variables-in-a-Workflow#122887 and it does mention that all the values should be passed back at the final stage as it seemed to be working but not populating the tables as it did. i.e Populated the last "Set Business Process Variable" and not the one before it. 

So the minor modification to the workflow you provided was to have it all in one "Business Process Variable" which also included an "Iteration" as per below:

 

I then used this to Assign the total line items that were in stock and not in stock back into 2 fields in Forms:

 

With that, I also then used an Inclusive Condition as you mentioned to the above fields and assigned the values to the correct Form based on the result. 

 

Thanks again Steve, 

 

Regards

Ziad

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.