Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Testing Subform fields for content & checking off a workflow box

Avatar

Level 3

Hi, it's been a long time since I used LiveCycle, so I'm having to refresh my memory.

I have a set of buttons on a page that reflect different sections to be completed within a form.  They actually represent a workflow.

Beside each section button I have a checkbox.  Each button simply directs the user to the relevant section.

When a section has been partially or fully addressed, I want a tick to be displayed in the relevant section checkbox to show workflow progress.

How can I write a script that will test whether any of the fields within each section (subform) have been completed.  If any have been completed (doesn't have to be all), then I want the corresponding section checkbox to be ticked.

Can anyone please assist?

Thanks,

Peta

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Peta,

Here is sample for you. I guess this is what you are after.

https://acrobat.com/#d=vsKdGcfUibtW2uaSMK6kzg

Thanks,

Bibhu.

View solution in original post

6 Replies

Avatar

Level 9

Hi Peta,

For each sections of the form in the exit event of the last field..Whether some fields are filled then you can script to tick the checkbox.

In the last field of a section in the exit event you can write.

CheckBox.rawValue = 1.

Thanks,

Bibhu.

Avatar

Level 3

Hi Bibhu,

Thanks for your reply.  That works for single fields at a time, but I've got several fields within each subform and I'm trying to avoid having to apply that code to every field.  What I'm looking for is something that can identify that at least one of the fields within a given subform has been completed and if so, the checkbox related that subform should be checked.

Any thoughts on that?

Thanks,

Peta

Avatar

Level 9

Hi Peta,

You can write the scripts to check the checkbox in the exit event of one field and can call the event of the field in other exit events of the fields.

For Ex : For field1 you have wriiten the scripts in the exit event of the field to check the chekbox.

              In the exit event event of field2 you can call the exit event of the field1. like : field1.execEvent("exit");

So that it acts as writing the scripts for everyfield by writing the script for one field,

Thanks,

Bibhu.

Avatar

Level 3

Hi Bibhu,

But wouldn't that still require me to have a script in every field to do that job.  Surely there's a way - say a resolveNode method or something that I can do a check for any fields within a subform having content?

Thanks,

Peta

Avatar

Correct answer by
Level 9

Hi Peta,

Here is sample for you. I guess this is what you are after.

https://acrobat.com/#d=vsKdGcfUibtW2uaSMK6kzg

Thanks,

Bibhu.

Avatar

Level 3

Hey Bibhu,

I thanked you in the other thread and I thank you again here.

You saved my bacon.

Thanks heaps, Peta