6 Replies Latest reply on Oct 5, 2012 4:14 AM by Frances

    If field has 'Other' enter text in specify field

    Frances

      Title

      If field has 'Other' enter text in specify field

      Post

           FM Pro 12 trial user

           I'm sure this will be an easy answer:-

           I have created a field which uses a values list.  In the list there is an option to select 'Other'.  If 'Other' is selected I would like to force text to be entered into a separate field which I have also created.  If any other option is selected the separate text field should be blank.

        • 1. Re: If field has 'Other' enter text in specify field
          schamblee

               On your drop down list use onobjectmodify script trigger and then perform a script with a if statement

               if[listvalue="Other"]

                set field[othervalue;"Other"]

               else

               set field[othervalue;""]

               endif

          • 2. Re: If field has 'Other' enter text in specify field
            philmodjunk

                 Define a field of type calculation, return type text with this calculation:

                 If ( Not IsEmpty ( FilterValues ( ValueListItems ( Get ( FileName ) ; "YourValueListNameInQuotesHere" ) ; YourValueListField ) ) ; YourValueLIstField )

                 Note that this will work with radio buttons, a drop down list or pop-up menu, but not a check box group.

            • 3. Re: If field has 'Other' enter text in specify field
              Frances

                   Have tried both posts from S Chamblee and PhilModJunk but cannot get either to work.  The solution from S Chamblee results in the script not accepting set field (tried replacing field with my actual field name but no joy). The solution from PhilModJunk results is not recognising ValueListItems.

                   My drop down field with values list is "Subject Category" and the other field is "Other Category".  I would like the "Other Category" field to force the record creater to enter text.

              • 4. Re: If field has 'Other' enter text in specify field
                schamblee

                     Listvalue is the field name that you are using with your drop down list.  You would use Subject Category in place of Listvalue  then you would use other category in place of othervalue.  

                     In the script editor you select Set Field then specify target field  "Other Category" and then you specify  Calculated Value "Other".

                      

                     I don't know what record creater is ? Do you mean when you click "New Record" ? 

                     You can have a field to auto-enter data by setting the auto-enter of the field.

                     You can select Creation Date..., Modification Date...,Serial Number, Value for last visited record, Data, Calculated value, or Looked-up Value.

                     If you want the word "Other" in a field when you create a new record new you would select data in Auto-Enter of the desired field and then enter the word "Other".

                      

                      

                • 5. Re: If field has 'Other' enter text in specify field
                  philmodjunk

                       Here is a demo file in .fp7 format. If you are using FileMaker 12, launch FileMaker and open the file from the File menu to produce a converted copy you can open and examin in FileMaker 12.

                  https://dl.dropbox.com/u/78737945/RadioButtonOtherDemo.fp7

                  • 6. Re: If field has 'Other' enter text in specify field
                    Frances

                          Many thanks to you both.  I now have it working. 

                         S Chamblee - Record creater is person creating new record. Sorry for any confusion.