AnsweredAssumed Answered

How To Script A Nested If

Question asked by user26728 on Nov 11, 2017
Latest reply on Nov 11, 2017 by user26728
  1. Hi.

This is making me crazy. Hope someone can tell me what I’m doing wrong?

 

I have six container fields and a button on a layout.

I want to press a button, have a script check for the first empty field and paste an object into that field.

For example: press the button, if field one is full, it pastes the object into field two, if field two is full paste into field three, etc.

 

Here is the last iteration of the script. It always works the first 2 times, then stops working.

 

nestedif.jpg

 

I’ve uploaded a demo file to show what I mean.

I know this is a nested if, but can’t quite get the wording correct. If I could use CASE this would be easy, I think, but being a script, cannot do this.

Any ideas?

 

Thanks

Attachments

Outcomes