Asu Posted October 16, 2018 Share Posted October 16, 2018 Hello FM Mavens, I need to accomplish the following task. I have several fields, sequentially tabbed, named A, B, C, D etc. Each of them can be set to 0, 1, 2, 3 or 4. User sets some of the fields to a number other than 0 THEN: I need a script that sets the fields that were left empty to zero. Obviously it could be done by explicitly defining the fields but there are dozens. I thought of something like Go to next field, if (isempty "next field") set "next field" to 0. The problem is that the (isempty <field>) function requires an explicit field definition so how do I accomplish that? Or there may be a better solution? Thanks Asu Link to comment Share on other sites More sharing options...
comment Posted October 16, 2018 Share Posted October 16, 2018 I strongly suspect that instead of "dozens" of similar fields, you should have records in a related table instead. I bet that would make a lot of things much easier, not just the current task. Anyway, if you are able to loop through the fields using Go to Field [Next], you can test if the current field is empty by = IsEmpty ( Get (ActiveFieldContents ) ) Link to comment Share on other sites More sharing options...
Asu Posted October 16, 2018 Author Share Posted October 16, 2018 Sure but this is a concept question. Thank you for your answer. Sorry, I forgot to ask the other half. Now I need to set the "active field" to a value. Link to comment Share on other sites More sharing options...
comment Posted October 16, 2018 Share Posted October 16, 2018 7 minutes ago, Asu said: Now I need to set the "active field" to a value. Use the Set Field[] script step, with no field specified. From help: If no field is specified and a field is selected in Browse mode or Find mode, that field is used. 9 minutes ago, Asu said: this is a concept question OK, but I still think the concept is flawed. Link to comment Share on other sites More sharing options...
Asu Posted October 17, 2018 Author Share Posted October 17, 2018 thank you Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 2011 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now