on 2023 Mar 02 1:43 PM
I know this question has been asked and answered many times before, but I can't find any answer that really goes in-depth.
I understand the basic
if ( your_condition ) {
this.presence = "hidden"; //Hide current object
}
but all the examples are always something about a condition on "this" like
if ( this.rawValue == "" || this-rawValue == null ) {
this.presence = "hidden"; //Hide current object
}
but I need a conditon on "that" - meaning the condition must check an other field that "this".
"That" other field is available as input in the context, but it is not printet, so it is not anywhere in the layout except in the dataview.
So in my dataview I have a graphic called BMARK_GRAPH and a structure called Z_LB_MAIN_LR and in that structure I have field called RECYCLED_CASING.
The BMARK_GRAPH is in the layout and I want to hide it by putting a condition in the initialize event.
I have tried many variations but so far no luck.
Example that does not work:
data.#pageSet[0].Page1.OutputArea.BMARK_GRAPH::initialize - (JavaScript, client)
<strong>if ( Z_LB_MAIN_LR.RECYCLED_CASING.rawValue == "X" )
{
this.presence = "hidden";
}</strong>
So, what is the correct syntax for this condition when i must refer to an other field that is in the context, but not in the layout.
Regards Thomas Madsen Nielsen
PS. is it possible to debug this javascript?
Request clarification before answering.
Solution:
data.#pageSet[0].Page1.OutputArea.BMARK_hidable_subform::initialize - (JavaScript, client)
var LV_recycled_casing = xfa.resolveNode("$record.ZLAB_TAB_STR.RECYCLED_CASING").value;
if ( LV_recycled_casing == "X" )
{
this.presence = "hidden";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.