Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

ALC - Java Scripts - Hiding Logic - Presence

Avatar

Avatar
Boost 1
Level 1
abhilashy577678
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
abhilashy577678
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
abhilashy577678
Level 1

28-10-2019

Hi All,

I have a form which has multiple insertion points and the fragments are stitched dynamically. Also this form has some non fragmented part or static parts.

The fragmented part/insertion points will be handled from workbench and for static parts we are handling from using initialize/DocReady event in script to hide / show the section.

Eg of script - Event - Initialize/Docuready

If (A=B)

{

     Subform.presence = "hidden";

}else Subform.presence = "visible";

Problem - These Hide/ Show logic is working well in design time ie only using designer preview when the data is passed from form properties/preview

                  BUT this logic is not working when its run time using Workbench process.

                  Can anybody help me with there inputs ? why the logic is not working when processed with process in workbench and working perfect in designer ?

Any other methods ways i can handle the static parts for my requirement to handle some sections to show and some to hide for diff variations.

Thanks in advance.

Regards,

Abhilash

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

14-11-2019

I don't use Workbench, however, the script your provided can't work, because it uses the wrong operator for comparing A with B.

Try

Subform.presence = A === B ? "hidden" : "visible";

or

if (A === B) {

    Subform.presence = "hidden";

} else {

    Subform.presence = "visible";

}