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

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

Recommended Posts

Posted

Hello People!

Perhaps I am just not lookint at this from the right perspective...the logic should be simple but yet it does not quite work.

Scenario:

Drop List [---------v]

initiated by a 2 separate scripts:

_____SelectListScript______________

Go to Filed[select/Perform,"g_field"]

Perform Script [ RunChoice ]

___________________________________

______SunChoiceScript___________

If[g_field="One"]

Show Message "you selcted one"

End if

If If[g_field="Two"]

Show Message "you selcted Two"

End if

___________________________________

It shold be just a simple reflection to what have users just entered/selected.... but I am frown.gif

did I struck a dumb note today?

Thank you for the help!

file attached

FileMaker Version: 6

Platform: Windows 2000

Posted

The workarround was to simply add a "submit" button and have it run the second script...I just dont know why they could not run in a sequence based on immediate drop-list selection...so I guess it is a solution

thanx!

Posted

Hi Alen! smile.gif

Attach this to your popup.

Go To Field [select/Perform, ValueListField]

Loop

Pause/Resume Script [0:00:01]

Exit Loop If [not IsEmpty(ValueListField]

End Loop

If [ValueListField = "Yes"]

Perform subscript

End If

If [ValueListField = "No"]

Perform subscript

End If

This is the basic idea. But what if Users can insert something else into the field? Or ... if it had "Yes" and they changed it to a "No." This script would not activate if so. So you would need to test what *might* have been in the field before ... I've frequently stored the value of a VL field in a global text and tested against the global to see if the selection changes. That will cover even if it's empty. And you might need to include a final test in case someone puts something other than Yes or No. Depends upon your setup, but I hope this helps move you forward with the basic idea. smile.gif

Posted

Hi LaRetta!

Thanx for the input!

I tried the pause step before and had little effect....and the more I think about I am probably better of adding a "submit/go" button as the second script is also conditioned and + show message is involved to warn user to their choice...I will post the new version.

Thanx again!

Drop.zip

Posted

On Windows the loop script doesn't seem to work too well. I always just use a Pause/Resume Script [indefinite] and then perform the If. Nothing will happen until you make a selection or click out of the field. I usually use a global to store the beginning value, then compare it to the field's value after the Pause/Resume, to determine if there's been any change or if the script should exit.

Posted

Queue said... On Windows the loop script doesn't seem to work too well.

Hi Queue. smile.gif Interesting. I haven't noticed any problems using the loop - at least using it with popup menu. Are you and Alen using a popup list instead? If you are using a popup menu, can you explain why it doesn't work for you? It has always served me well but then I usually test platform and stack both popups. But I just tried it with only popup menu and it appears to work perfectly also. smile.gif

Queue, when I try your suggestion, the script won't activate automatically for me after I make a selection. I changed the pause duration to indefinitely and removed the loop so it looks like:

Go to Field [ vlfield ]

[ Select/perform ]

Pause/Resume Script [ Indefinitely ]

If [ vlfield= "Yes" ]

Perform subscript ...

End If

If [ vlfield = "No" ]

Perform different subscript ...

End If

Not pretty, I know, but I wanted to see any subtle differences between them. I would really like to understand why we are getting different results! Thank you. smile.gif

LaRetta

Posted

You're right, it does work all right with a menu. I think I still prefer using just a single pause instead of a loop with a pause, though. And I didn't mean indefinitely; don't know where that came from. crazy.gif I meant 0:00:00. My bad.

This topic is 7523 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.