Hi all,
I'm having a little trouble with an if statement and I wondering if you can help. I'm creating a form where I would like text box field A to populate with information from fields B & C, only if fields D & E match. Below is my current statement. The form keeps getting stuck on the first if statement when all cases are true. Is there a way to have the statement continue even after one case is true (i.e. to make a list in text box A)? Any help is appreciated. Thanks!
//form1.DCF.Subform3.NSUFACULTY1::click:
if (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCF.Subform3.NSUFACULTY1=forms1.FacePage.Subform1.PINAME1
elseif (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCP.Subform3.NSUFACULTY1=form1.FacePage.Subform.NAME2
endif
Views
Replies
Total Likes
There's a typo.
//form1.DCF.Subform3.NSUFACULTY1::click:
if (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCF.Subform3.NSUFACULTY1=forms1.FacePage.Subform1.PINAME1
elseif (form1.DCF.Subform3.PIACADEMICUNIT1==form1.FacePage.Subform1.PIACADEMICUNIT1) then
form1.DCP.Subform3.NSUFACULTY1=form1.FacePage.Subform.NAME2
endif
Views
Replies
Total Likes
Thanks Steve. Is there anything else I could change? Even with the typo correction it isn't working....
Views
Replies
Total Likes
I think you still don't have the full path. Try adding .rawValue to the end of your fieldnames, i.e.:
//form1.DCF.Subform3.NSUFACULTY1::click:
if (form1.DCF.Subform3.PIACADEMICUNIT1.rawValue==form1.FacePage.Subform1.PIACADEMICUNIT1.rawValue) then
form1.DCF.Subform3.NSUFACULTY1.rawValue=form1.FacePage.Subform1.PINAME1.rawValue
elseif (form1.DCF.Subform3.PIACADEMICUNIT1.rawValue==form1.FacePage.Subform1.PIACADEMICUNIT1.rawValue) then
form1.DCP.Subform3.NSUFACULTY1.rawValue=form1.FacePage.Subform.NAME2.rawValue
endif
Also, please double check that the scripting language is set to javascript.
Views
Replies
Total Likes
Views
Likes
Replies