Expand my Community achievements bar.

SOLVED

Dropdown list box values caption value changes

Avatar

Former Community Member

Hi,

I have a dropdown list box with 2 fixed values and when the user changes the value I want the caption text for fields on the screen to automatically change. I saw this post http://forums.adobe.com/message/3358411#3358411 and have done something similiar but despite no errors the captions on the screen are not changed.

The formcalc code I have is:

if (DropDownList1.rawValue == "1")

then NAME2.caption.value.#text = $record.IS_DATA.PERS_NAME2_CAPTION

else NAME2.caption.value.#text = $record.IS_DATA.COMP_NAME2_CAPTION

endif

I have also tried using resolveNode:

if (DropDownList1.rawValue == "1")

then xfa.resolveNode("NAME1.caption.value.#text").value = $record.IS_DATA.PERS_NAME1_CAPTION

endif

This is coded within the EXIT event of the drop down list1. The context to this is the form is interactive and generated from an SAP UI.

Can anybody see anything that I am doing wrong/missing? Is this something that should be possible?

Kind regards,

David

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi,

Unfortunately changing it to Javascript didn't work either. However I discovered that from the SAP side I was not fully populating all the system parameters and the standard structure SFPDOCPARAMS has a field called DYNAMIC in it. Once I set that my original code worked :-)

Issue solved! Thanks for your help.

Cheers,

David

View solution in original post

2 Replies

Avatar

Level 10

Hi,

While you should be able to get this to work in FormCalc, I'm going to suggest using JavaScript. Certainly resolving the node is a JavaScript method.

So you would change the language and syntax to JavaScript with the XFA.resolveNode() method.

Hope that helps,

Niall

Avatar

Correct answer by
Former Community Member

Hi,

Unfortunately changing it to Javascript didn't work either. However I discovered that from the SAP side I was not fully populating all the system parameters and the standard structure SFPDOCPARAMS has a field called DYNAMIC in it. Once I set that my original code worked :-)

Issue solved! Thanks for your help.

Cheers,

David

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] ----