AnsweredAssumed Answered

Script to clear a variable number of fields.

Question asked by sgbotsford on Feb 25, 2014
Latest reply on Feb 26, 2014 by philmodjunk


Script to clear a variable number of fields.


     I'm trying to write a script that clears 1,2, or 3 fields then positions the active field to the first one cleared.


     I tried this: 


     Set Variable [CurrentField] = GetFieldName( Self )

     But I cannot even get this done.  I get a message "This function cannot be used in this expression"  And the word Self is highlighted.


     Q1:  Why can't it be used?

     Q2: How do you find out this information. 

     Three hours later.

     Ok.  I found out that Self seems to be very restricted where it can be used.  No explanations why.


     So I'm doing with the following script, passing a single number as a parameter.


     Ah hell.  You don't seem to be able to cut and paste from a script window.


     This has been a tough day.  I finally got conditional lists licked.  But the simplest things are so hard.


     I wanted originally to clear fields on modification of one field.  I wanted the "On Modify" script to do this:



     For $i =0;$i++;$i<=$Count {

         GoTo NextField

         Clear [Select;]



     You can't do that. 

     Self doesn't work there.

     It takes 3 lines, not 1 line and a } to make a loop.

     There is this involved Set Variable incredibly verbose syntax.  Indeed there is a lot of verbosity that doesn't add clarity.

     Everything takes a zillion clicks to do.  I can't just type.

     All the windows are modal.  This means you can't have your relationships window open, while designing a layout.   You can't have 3 layout windows open.  It takes 5 clicks to get from testing an entry in a layout to editing a script.  And then you can't leave the script window open, but it takes another 3 to get back to make another test.

     This is an environment that makes it tough to maintain code:  Tons of little files.  No way to bundle files into libraries.  No way to make functions.  Comments have to be on a line on their own, and I can't just type #, but I have find and double click comment.  Any form of abstraction is like walking through wet cement. 

     NONE of the places where I click "learn more" "help" "User Manual" work.

     Frame maker guys:  Clean up the syntax.  Give us something more like Perl, or php, and less like COBOL or FORTRAN.

     Give us non-modal windows.  Let me have a working view and a design view of a layout at the same time.  Reduce the number of clicks it takes to do something.  E.g. You have 3 layers of windows open when you edit a value list.

     I frustrated and tired.  I know this comes as a stage inlearning a new environment.


     But right now I'm quitting Filemaker, and am going to go look at what else is out there.

     I may be back.