April 20, 200421 yr 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 did I struck a dumb note today? Thank you for the help! file attached FileMaker Version: 6 Platform: Windows 2000
April 20, 200421 yr Author 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!
April 20, 200421 yr Hi Alen! 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.
April 20, 200421 yr Author 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
April 21, 200421 yr 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.
April 22, 200421 yr Queue said... On Windows the loop script doesn't seem to work too well. Hi Queue. 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. 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. LaRetta
April 22, 200421 yr 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. I meant 0:00:00. My bad.
Create an account or sign in to comment