Expand my Community achievements bar.

SOLVED

Getting two text boxes to appear...

Avatar

Former Community Member

Hi Guys.  Im trying to get to two text boxes to appear once a selection is made from a drop down box. The two text boxes have been set to invisible and the formCalc is written under the change option in the drop down box.  This is not working when i make the selection. The text boxes only appear once I make the selection the second time and  on the option I want the text boxes to be visible on.  ---CV103 is my Drop down box ---CV107 & CV108 are my text boxes that I have set to invisible.   I have pasted my code below as I cannot seem to get this right. Please help!    root.P1.client.variable_option_client.cv103::change - (FormCalc, client)          if(root.P1.client.variable_option_client.cv103.rawValue == "Partner")   then   root.P1.client.variable_option_client.cv107.presence = "visible"   root.P1.client.variable_option_client.cv108.presence = "visible"    else   root.P1.client.variable_option_client.cv107.presence = "invisible"   root.P1.client.variable_option_client.cv108.presence = "invisible"    endif  Thanks  Joey

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The issue is that the rawValue does not hold the value that you select until you exit. If you want to trap what the user has selected on the change event you will need xfa.event.newText....instead of Fieldname.rawValue

Paul

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

The issue is that the rawValue does not hold the value that you select until you exit. If you want to trap what the user has selected on the change event you will need xfa.event.newText....instead of Fieldname.rawValue

Paul

Avatar

Former Community Member

thanks for the help.

where about would I put the specific text i wish to capture in the  xfa.event.newText?

would it be like this: if(root.P1.client.variable_option_client.xfa.event.newText = "Partner")

I still cannot get it to work.

Avatar

Former Community Member

No ..the DDlsit will populate the xfa.event.newText with the selcted value. So the code on the chnage event fo te DDList woudl be ....

if(xfa.event.newText= "Partner") ........

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----