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

Question

Question

Forms - Populate Table during (Read-Only) Approval Stage

asked on November 30, 2018

I have a form that has approval steps and I am trying to populate a table from a view/stored procedure based on a value of a field that is populated after the initial user-submission.


When a user submits this form, the first step is a workflow that generates an ID for that form and populates a field on the form.  The next step is to review and approve the submission.  After this stage, a workflow updates a SQL table with the approval step, the username, date/time, and some other information.  The table included in the form will then be populated by that SQL record.  

 

There are other approval steps that follow the same logic.  My issue is that the client has requested the approval stage to have an overflow look rather than the original forms tabular view.  The overflow is only available when checking the "Make form read-only for  users the task is assigned to" box.  I am fairly certain this read-only attribute is stopping the form from being able to run the stored procedure.  I have tested populating a table from the same view/sp in a test form without the read-only attribute and it works fine.

 

Is there a way to do this?  Can I set read-only on the ENTIRE form, like the check-box is doing, in JS so that the form can run the lookup?

1 0

Replies

replied on December 3, 2018 Show version history

Paul,

The issue you're seeing is that the User Task checkbox for making the form read-only has different behavior compared to setting read-only on a field/section on the form.

When using the user task setting, it "flattens" the form content so there are no HTML inputs anymore and the lookups will not work.

You could create a copy of the form (unless you're already using a separate form) and set all of the sections to read-only (so you don't have to do it for each individual field), then use the "read-only" form in that user task.

1 0
replied on December 3, 2018

Jason,  thanks for the information.  I kind of figured this was the case as the link forward to an iFrame and not the original form.  

 

I ended up setting up some javascript to apply "readonly" and "disabled" on the fields I did not want the user to adjust as well as update the fields via workflow with the "Set Business Process Variables" tool.

1 0
replied on December 3, 2018 Show version history

If you're going the JavaScript route, you can also apply the "backend-readonly" attribute because that will more closely mimic the behavior of the read-only check box in the form designer.

 

0 0
replied on December 3, 2018

I noticed this attribute as well.  Thanks for the tip.

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

Sign in to reply to this post.