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

Question

Question

Laserfiche Cloud - Form Collections - a record in a collection to a user task

asked on April 29, 2024

I have a form that I want a record in a collection to go to a user tasks by department / user

On the following form, I'm trying to populate fields from the collection 

Collection1 has the following fields:

Department, SubmitTo, RowNumber

in the default value of the form I have

{/dataset/Collection1/Department[/dataset/Collection1/RowNumber]} 

but when I test it shows a blank field on the form.

When  I look at the monitor of the Business process I see the variables are populated..... what am i missing?

 

 

 

 

0 0

Replies

replied on April 29, 2024

Right now tokens/variables do not have calculation like syntax like workflow does, this is something we will look into that was highlighted at empower.

 

In the meantime, you can use formulas. Under the advanced tab of the field you are using the default value for, set the formula to 

=INDEX(Collection1.Department, RowNumber)

 

0 0
replied on April 29, 2024

Thanks for the direction...  i tried your formula =INDEX(Collection1.Department, RowNumber)

and it gives me a Calculation contains an invalid variable...

=INDEX(Collection1.Department, Collection1.RowNumber) doesn't give me an error but also doesn't populate anything in the field...

 

 

0 0
replied on April 29, 2024

I totally misread what you were trying to do. I thought RowNumber was outside of the collection. What is the destination of the field you want to set the value of?

 

* If you are working within rows, you dont need the RowNumber Field at all, you can use ROW() to get the row of the field as it evaluates. 

For example,
=INDEX(Collection1.Department, ROW())

 

* If you are attempting to set a field outside of the collection than you do need a row number field but it wouldn't be the row number field from within the collection as it is unique per row and cannot be summarized to a single value. This is where I thought you were trying to set the value via a row number field outside the collection

0 0
replied on April 29, 2024

Thanks for the response!  

The RowNumber is in the collection.... but I want a Text Field (Department_Text) be populated from the Collection on the form after it is collected.

I have a gateway that can take up to 6 rows (from that collection) or 6 different departments and each will be assigned a task.

When you say the collection as it is unique per row and cannot be summarized to a single value make my head hurt.... are collections not arrays that I can call upon? or is this syntax that you spoke of earlier....

My collection fields are Department,SubmitTo,RowNumber so the data looks like this...

Finance, hsimpson,1

HR, rwiggums,2

 

so for task 1 - submits to hsimpson, and populates a text field department_text with Finance

for task 2 - submits to rwiggums, and popuates a text field department_text with HR

 

0 0
replied on April 29, 2024 Show version history

"are collections not arrays that I can call upon? or is this syntax that you spoke of earlier...."

  • Yes they are and you can access values using the INDEX(Collection.Column_Name, ROW_Number)

 

Ok what you are doing is what I originally thought you were doing. How are you telling the form which task number you are loading? 

0 0
replied on April 29, 2024

Zachary you rock with the quick replies....

The form task before has fields for MultiUser1 through MultiUser6,  

I use the =INDEX(Collection.SubmitTo,1) through to  =INDEX(Collection.SubmitTo,6) to send off the task number.

I'm trying to use the same form for all users task... so I want the collection row that goes with the user.

I was adding the RowNumber in the collection so I can grab that row in this step....

INDEX(Collection.Column_Name, ROW_Number) <- how do I know what rownumber without defining it in the collection to use later on....

 

 

0 0
replied on April 30, 2024

Ideally your MultiUser1 through 6 is how you identify which row in the table you are working with. Are you using workflow to set this field? 

Parallel tasks in Forms is slightly awkward behavior if the user is working with any of the same fields at the same time. Whoever submits a value for a field last will be the user to set the field. Similarly, if someone opens the form after someone else in the parallel tasks submits, they will also see this new value.

 

If you are strictly performing approvals at this step with no direct form interaction you are fine. How I have built this in the past is I would set MultiUser1 through 6 and MultiUserRow1 through 6 (easier to set it in workflow than find the row with formulas/JS) within workflow using the collection where that user is the user being assigned the task. When the form loads I use the name of the user who opened the form in a field ActiveUser and the row number to pull the value from the collection I want to load. Then clear ActiveUser on submission of any of the parallel tasks.

Are you trying to run the tasks in parallel or in series?

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

Sign in to reply to this post.