on 05-01-2007 11:40 PM
Folks,
I need to write this expression in formcalc.
<i><b>if (this.rawValue == 1) {
data.first.Positions.P1.presence = "visible"
data.first.Positions.P2.presence = "invisible"
}</b></i>
please help me
Hi Manish,
Try
if ( $ == 1 ) then
$.first.Positions.P1.presence = "visible"
$.first.Positions.P2.presence = "hidden"
endif
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
k.
Hey,
$ -> current field
$.parent -> the parent node of the referring field
$record. -> the root node in the hierarchy.
Make sensible use of it. Don't make too long access path. If you can display your hierarchy, we may help you or you can try your own. there is help in the script editor for these.
you will get more info about the accessors in the life cycle designer help.
Thanks and Regards,
Anto.
Assuming, the hierarchy gioes something like this -
first(page)
-BasicData
-BDDetails
-Positions
-
P1
-
P2
-dropdown. (Basic Data, BD details, POsitions, drop down, all at the same level and P1, P2 with in the Positions).
Write the script in the dropdown -
$.parent.Positions.p1.presence = "visible" / "hidden"
$.parent.positions.p2.preence = "visible" / "hidden".
Note - it is case sensitive. Check at the hierarchy.
Hope this helps.
Thanks and regards,
Anto.
Hi manish,
Hidding elements can be easily done if the UI elements are in different subforms.
U have not mentioned the subform name in which dropdown is present
am assuming it to
if ..,
DDLSubform
dropdown is hierarchy -
check object properties ...if binded to $record.dropdown
Then u can script as
if($record.dropdown == 1)
Page.Positions.P1 ="visible /hidden"
else
Page.Positions.P2 ="visible /hidden"
end if
hope helps.
Cheers
Swathi
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.