Link to home
Start Free TrialLog in
Avatar of fatihdi
fatihdi

asked on

I would like to set the hide when programatically with Lotus Script ,How can i do it?

I have a form that has many fields on it and I need to programatically set the hide-when of the fields according to some logic , How can I do it ?

field1
field2
field3
.
.
.
 The field names are following in a row so i can set the value of those fields with a for loop with replaceitemvalue, but how can i set the hide-whens programatically? is there a way to do it?
 
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Assuming that this is a traditional Notes application, the answer is: No, you can't loop and set the hide-whens.  The only option is to write formulas that evaluates when the page is refreshed.

If this is a web app (or xPages), then you can use Javascript to set the style's display property to 'none'.
It should be possible with DXL export / manipulate xml file / DXL import .. more advanced stuff though.

Have a look at this article, its worth reading it just to get a better overview of Notes design:
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/ls-design-programming.htm
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Assuming this so you can quickly configure an application programatically quickly then you could have some base fields that hold a string that defines which fields to hide.
If you then have each field numberwed in a config doc, not actual name but somewhere you have list that field x is number y then you can add a simple hide when to every field.

A simple string could be 0 or 1 to set the hide, so hide if 1
0010010

Would mean field 3 and 6 will be hidden.

The fields would then have @if(@middle(referencefiled;fieldnumber;1)="1";@true;@false)

You could also put values in a list and use @subset but I find string and @middel faster and more flexible.

Not programatical but something that can be applied to every field and modified quickly in a profiel or config document etc.


What are you trying to achive or do, that may help the experts come up with a good suggestion for you.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial