Do you need to send two items of information to the script, the tag number as the size?
You can combine the tag number and size info into a single value passed as a script parameter and then the script can parse data back out of the script parameter.
Example: Your script parameter for the Perform Script on Server call can be List ( TagNoField ; SIzeField ). Then in the script, GetValue ( Get ( ScriptParameter ) ; 1 ) will return the tag number.
Thats basically what im doing now.
The user inputs the "tag number" into the field which then runs the
Variable of tag number
run server script and pass tag number
-Server script -
get(scriptparameter)"tagnumber" as variable
Perform find for variable
Exitscript(result: List(inventoryname;inventory id)
Now after that find i need a way to grab more than 1 item and send them back to the start script.
Then list them by inventory name so the user can choose which one he needs to take out.
Define a "list of" summary field to list all the values you want to return from the found set produced by the find. Refer to this summary field in your ExistScript step in order to return that list to the originating script.
Now, once i pass the list of summary to the trigger start script, What is the best way to retrieve the list and show it in a value list so the user can choose one of them?
I don't think that I'd use this method just to get a value list. There are many simpler methods possible, but if you create a record and set a text field to the value of this returned list, a "use values from field" value list will take such a return separated value list and return a list of values from it. This can be a conditional value list that only lists the values from the single, newly created record and thus multiple users can be doing this all at the same time, but see different lists as the system creates a different record for each.
Ok, so what i ended up doing was during my server script after the perform find i put a
if ( get(foundcount) > "1")
Then i put in the trigger/start script
if ( get(scriptparameters) = "MORE"
new popup window
goto layout "MORE" - (layout "MORE" has a portal defined to inventory table)
portal filter is $inventory= inventory::tag number - ($inventory = original field entry for server script lookup)
Now i have a list based on the original entry from user that can be selected and scripted to take out of inventory.
You might be interested in "Adventures in FileMaking #1 - Conditional Value Lists". This is an exploration file that demonstrates 8 different ways to set up a conditional value list--a list of values that is only a selected subset of all available values.
Thank you for the additional reading i will read up on that.
The way i ended up doing it is better, in my opinion, because i am not creating any additional records. All I'm doing is using scripts and variables to eventually take inventory out. But, then again, i could be mistaken. :)
PS. This is why i like filemaker, Theres more than one way to get to the same ending.
Yes, and this idea of using perform script on server to produce a list of values represents another way to set up a conditional value list--one that I hadn't previously considered and which might be potentially useful in certain circumstances--especially WAN and web published situations where using a relationship to match to the correct sub set of values might take far too long...