Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7415 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've got a custom dialog box that appears and asks the user to enter a date.

It then stores this date in a global field inside my globals table.

The problem is, half the time, it fails to update the global field, so the script elements that follow don't work properly. (and the annoying part is that half the time, it actually DOES properly update the global field.)

Has anyone else had this issue, and is there a workaround, or is it something I'm doing incorrectly.

Thanks.

Posted

Values entered in a Custom Dialog are only accepted if the default button is hit by the user. The other two buttons will cause it to ignore any values entered. Could this be the problem?

Posted

Well, after some research on my own, it seems I've found the problem, and I still believe it to be a bug.

Filemaker will only update the values in a custom dialog box when the DEFAULT selection is chosen. (at least with my current setup and system, dev 7.02,server demo)

This is bad for me (and I would suspect others) who want a default to cancel, but allow a script to continue when selecting another value.

Can anyone else reproduce this?

(Please see the example file)

test.zip

Posted

Sorry, there was a response as I made my second post.

My response to that is, how is this not a bug?

I need to default to cancel, and need to have the value recorded no matter what they choose. I will then make the decision later on in the script if I want to use that value or not...

Posted

Depending on which version you are using will determine the syntax. However, if I have a custom dialog with more than one button, and I want to control the behavior after a button is clicked then I must script for each button.

In the script the step following the Custom Dialog should be an IF statement:

If[status(CurrentMessageChoice)=1] //that is the default button

// do following steps

SetField....

Else

// do following steps

SetField...

EndIF

Of course if there are three buttons then you will need another logic choice.

The caveat to this is that FileMaker will use the behavior of the default button if the user clicks the X to close the Custom Message (at least on Windows). So you will likely want to script that first button to do nothing, or whatever.

Posted

Well I downloaded your sample and see it is version 7. The way you have it scripted, both scripts work exactly as anticipated. When you put the step of Halt Script, it does just that, halts everything.

If you want it to set to the global first then halt, you must tell it so. I see no bug here.

Posted

jfgeiger,

I understand your frustration with the Custom Dialogs not accepting values when button 2 or button 3 is chosen. I had the same problem, which led me to skip the Custom Dialog and use a layout instead.

If this doesn't appeal to you, I think there is a plug-in that will let you do more with customizing the Dialogs (haven't used them myself.)

I can only think that FMI designed it this way so that Cancel buttons (which are usually button 2 or button 2) would not accept the values entered.

Posted

As I said, I should be the one to decide if I use the value, not Filemaker Inc.

It's just another in a series of things that i think are just poor design...

(dropdown value lists anyone?)

Thank you for your help/responses though.

This topic is 7415 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.