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

Question

Question

Need to display the name of the most recent approver for 2 approval tasks and have it update again after being sent back and approved again at the same task

asked on July 17

I'm running Laserfiche Forms Professional Version 11.0.2311.50564. I have a Laserfiche Forms process using the Modern Forms Designer for all forms in the process.

First half of Process Flow Diagram

The Payroll Reviewer wants to see on the form (already tried to explain the action history has all this info) who last approved at the Dept Head Approval task and the Director of Finance Review task, even after it gets sent back to the initiator for revisions. The name and date of the people who sign the form for the approval tasks appear correctly, unless the form is sent back to the initiator for changes and a different person signs. That's because once a text box gets a value during one task, it cannot be changed in another task.

I have tried to use other variables in Custom HTML on the Payroll Review forms, but if it's on the Last Payroll Review task, I won't be able to show the Previous User Submission > Participant > Name to display the Dept Head Approver, and I can't use User Task(s) > Dept Head Approval > Assigned To, because it gets assigned to a team and it's possible that it could be assigned to someone outside the team, too.

Wondering if a Workflow is required here. I tried looking for a solution in Laserfiche Answers, but couldn't find the exact scenario.

0 0

Replies

replied on July 23

Hopefully someone can provide a solution that could work without WF, but I couldn't find a simple one with as many user options and loops as the form could move through.  For accuracy, you could save the date and user of each submission with workflow to a SQL table and then use a look up rule to populate the history in the final viewer task so they can see who the last approver was.

1 0
replied on July 24

Thanks for the reply @████████. I'm wondering if this might be better suited for a feature request. I was hoping to not have to build a WF for this. I appreciate your suggestion! I think that would work.

0 0
replied on July 24 Show version history

How I would set this up. 

  1. Have hidden a field that the default is set to the current user. Make sure this field does not save the value because you want the field to refresh at each step.
  2. Have a multi-line field, that user can see, and in the javaScript you will went to set it to read only, because if you set it as read only using the 'Read-Only' option the values will not be saved. 
    1. LFForm.disableFields({fieldId: 2});

       

  3. When the form opens/on load in Java script grab the values for all the fields above.  Keep whatever was already entered in the muli-line and add to it the current user information. 
    1. let currentUser = LFForm.getFieldValues({fieldId: 1});
      let multiLine = LFForm.getFieldValues({fieldId: 2});
      
      let formattedML = multiLine + '\n' + currentUser 
      
      LFForm.setFieldValues({fieldId: 2}, formattedML);

       

1 0
replied on July 24

hmm.. my way keeps a complete list so not exactly what you are looking for.

So you would not need a mulit-line, instead have a single line that is hidden that holds the last user, displays that value on the form (maybe in a custom html) then over writes the data with the current user (they will become the last user for the next step).

1 0
replied on July 24

I wonder if I could do this using JavaScript. Maybe if I add a table (hidden via Field Rules, with data being saved), with one text field, add a new row to the table at the approval task,  and set the new row's field to current user's name. Then, on the Payroll Review task, add an HTML field that displays the value of the last row in the hidden table. Not sure that would work, but it sounds like it might.

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

Sign in to reply to this post.