I am trying to script an if statement to define the background value depending on the instanceIndex of a subform. I have tried it in the click event of the addButton and the indexChange event of the subform. I saw an example of exactly what I am trying to do, but for the life of me I cannot locate it now. I have searched both this forum and the users forum and I know it was in one of them. Anyway, here is what the script looks like:
I have also tried to use the or ( | ) and combine the if's. My question is... Am I using the correct event; am I placing the conditional statement in the appropriate place; or am I out in left field again? Any suggestions would be very appreciated. Thanks in advance. -rpeterson
Many thanks for your answers...I started going through the links and reading the stuff. I've gone through the LC Designer Scripting Reference on the previous versions, looking at the 8.2 version of the reference, it seems they have the same issue of not sufficient examples/explanations on how to access non-common features/properties.
The problem I'm facing is I think in understanding the grammer of XFA and referencing in some special cases such as dealing with non-interactive objects.
The case I'm trying to implement is as following: In our form, there will be visual indicators(3 circles - it's like traffic light) that will show the status of specific section of the form. The circles will be by default set filled by gray color, and depending on the values collected from the section's fields (based on certain logic) one of the circles will be filled by either Red, Yellow, or Green color.
Currently, I'm using two objects (on top of each others) for each circle (one filled with gray and the other one is filled with, for example, green color), and using presence to hide and unhidden the required "colored" objects. But as you can see, this method is not the best and having access to the object's visual properties is better coding practice (I assume)
I'm hoping to get the required assistance on the "how to" from this forum...