2 Replies Latest reply on Sep 17, 2012 10:39 AM by philmodjunk

    Why can't a Custom Dialog script set a variable?

    vfoecke

      Title

      Why can't a Custom Dialog script set a variable?

      Post

           In my database, I use frequent Custom Dialog script steps to gather information from the user.

           I find it puzzling that the Custom Dialog script step can only set a pre-defined field and cannot simply place the user's answer in a variable, either local or global.

           Instead, I need to place the answer into a field (I use a global foield), use the information, then clear the field.  It adds extra unnecessary steps.

           Am I missing something?

           Could such a simple concept be impossible to implement for a reason I don't perceive?

        • 1. Re: Why can't a Custom Dialog script set a variable?
          davidanders

          http://forums.filemaker.com/posts/7d1edf82d3?commentId=127303

          Title:  User Input to local variables then scripting to perform a find.

                              You can't, you have to use one method or another to allow the user to enter the values into fields such as the global fields that you are already using.

                              Here's an example, with global fields. If you want to use local fields you can adapt it with the variables as I have already described above, but I see no purpose to doing so:

                              Show Custom Dialog ["Please enter some values" ]
                              # In the previous step, Specify two input fields to link to MeasurementRegistration::g_gr and MeasurementRegistration::g_meas]
                              Enter Find Mode[]
                              Set Field [MeasurementRegistration::GRLev ; MeasurementRegistration::g_gr]
                              Set FIeld [MeasurementRegistration::AsmtCode ; MeasurementRegistration::g_meas]

                              Note: Show Custom Dialog is only one of three different ways to do this. It's easy to set up, but you can't format the input fields with value lists and you can't validate the input until after the user dismisses the custom dialog so it may not be flexible enough to work. The other approaches, however, still use this same basic script.

                

          • 2. Re: Why can't a Custom Dialog script set a variable?
            philmodjunk

                 What you want would be an excellent improvement to Filemaker Pro. Feel free to use the feature suggestion form: http://www.filemaker.com/company/contact/feature_request.html to suggest it.