Product/components used and version/fix level: N1 9.3.3 fix 3
*Detailed explanation of the problem: We build form fields from queries using the tag in xml. We need to dynamically set the form field title value. I cannot find anything in the docs on how to do that. I tried using a Natural variable, but it was just entered as text.
I was provided with an answer here, but I am doing something wrong and it isn’t loading the variable.
The relevant program variable:
01 #MAP-FIELDS
2 STATUS_XVAR-DESC-CV (A/5) DYNAMIC
The XML
<repeat>
<tr>
<hdist>
</hdist>
<field bgcolorprop="bgcol_xselection-cv" datatype="string 1" displayprop="disprop_xselection-cv" fieldstyle="font-family:Courier New;font-size:12;color:#000000" invisiblemode="cleared" length="3" njx:natcomment="statusprop=status_xselection-cv" njx:natname="#MAP-FIELDS.#ADDR-SELECTION" statusprop="status_xselection-cv" textalign="center" title="all address selection" uppercase="true" valueprop="xaddr-selection" width="45">
</field>
<hdist width="10">
</hdist>
<field bgcolorprop="bgcol_xvar-desc-cv" datatype="string 22" displayprop="disprop_xvar-desc-cv" fieldstyle="font-family:Courier New;font-size:12;color:#000000" invisiblemode="cleared" length="22" njx:natcomment="statusprop=status_xvar-desc-cv" njx:natname="#MAP-FIELDS.#VARIABLE-DESC-GUI" statusprop="status_xvar-desc-cv" textalign="left" title="mail address description" titleprop="STATUS_XVAR-DESC-CV" valueprop="xvariable-desc-gui" width="245">
</field>
</tr>
</repeat>
Hi Ian,
you are setting
titleprop=“STATUS_XVAR-DESC-CV” and statusprop=“status-xvar-desc-cv”
The same property name, one time in upper case and one time in lower case. For Natural it is the same. But the Natural for Ajax framework is implemented in Java and JavaScript and for these languages it makes a difference. I have doubts that this is doing what you want. My recommendation is: If you want it to be the same variable, chose the name in lower case for both. If you want to have different Natural fields, use different names, not just different upper/lower case. Could you please try this?
Best Regards,
Christine
What I would really like to do is use the #MAP-FIELDS.#VARIABLE-DESC-GUI as the tooltip.
I tried taking
01 #MAP-FIELDS
02 #VARIABLE-DESC-GUI (A22/5)
MOVE #MAP-FIELDS.#VARIABLE-DESC-GUI TO TOOL_TIP (A22/5)
titleprop="TOOL_TIP"
But that didn’t produce any output.
Hi Ian,
The following example works in my NaturalONE and shows the tooltips correctly:
Layout code snippet:
<rowtablearea2 griddataprop="lines">
<repeat>
<tr>
<field valueprop="myfield" titleprop="TOOL_TIP"...>
...
</tr>
...
Natural code snippet:
1 #MAP-FIELDS
2 #VARIABLE-DESC-GUI (A22/1:5)
EXPAND ARRAY LINES TO (1:5)
MOVE #MAP-FIELDS.#VARIABLE-DESC-GUI (1:5) TO TOOL_TIP (1:5)
Can you please paste your complete grid definition and the corresponding Natural data definition for your grid.
Best Regards,
Christine
One thing worth verifying: titleprop resolves against the grid’s data area, not just any standalone Natural variable. Make sure TOOL_TIP is declared in the same grid data structure as LINES and has the same occurrence/dimension you populate with MOVE … TO TOOL_TIP (1:5); otherwise the browser has no TOOL_TIP property to read. Also keep titleprop and statusprop names consistently cased so they are not treated as different Ajax properties.