Thank you for your post!
I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where you should receive even more views and potentially more advice!
There are a couple of ways to accomplish flagging a set of records.
1) The quick and dirty method is to use a field, usually set as a checkbox, that the user checks off. The set of records where the checkbox is selected becomes the selected list.
This works fine in a single-user environment. In a multiple-user environment, it breaks badly, because user A can flag the same records user B is trying to flag. That collision will break the flagged set. So you need something else.
2) The more sophisticated way is to use a list of IDs stored in a variable or global field. Since variables and global fields are unique to each user, they won't step on each other. You can then create a script that loops over the list of IDs and creates a Find request for each one, isolating the found set.
I use a Custom Function for the latter method that adds or removes a value from a return delimited list based on whether it's already there. But you can do something directly in scripting.
So, to use the latter method, your selection script step might look something like this:
Set Field [ gList ; List ( gList ; currentTable::idField ) ]
To remove an item from the list, you might do:
Set Field [ gList ; Substitute ( gList ; "¶" & currentTable::idField ; "" ) ]
Then, when you go to Find the list, you do something like this:
Set Variable [ $count ; 1 ]
Enter Find Mode [ Pause: Off ]
Set Field [ currentTable::idField ; GetValue ( gList ; $count ) ]
Set Variable [ $count ; $count + 1 ]
Exit Loop If [ $count > ValueCount ( gList ) ]
New Record / Request
Perform Find [ ]
Okay, so what does this beast do? First, we set a counter, which allows us to pick out a specific value from among the list of values the user has selected. It then enters Find mode and starts inserting Find requests for each value. Once it runs out of values (which is when the counter exceeds the number of values in the list), it performs the Find.
Now, this is a bare skeleton. It needs some additional goodies, like error trapping, the interface design, and so forth. But this should get you started.
1 of 1 people found this helpful
It would be possible to set up a "request table" where each time a user selects a track, the script checks to see if it's already selected and if not, adds it to the list--building a combined list of requested tracks from multiple users. A field in this table could even count the number of times the track was requested by different users if that's a useful feature to have.
Thanks! Did't know where to post it.
Thanks! Yes, It's for only one user. I've done the down and dirty in the modification of the app previously, but it asks for a value list in order to have a checkbox filled in. What am I missing? I'm trying to make the checkbox as an indicator to add to a running list. That's where I am lost.
Just make a value list with one value (like Y or 1). Assign that to the checkbox field.
Thanks Mike and Phil. I'm all set now. Just need to tweak it and it should work great. My next learning experience will be to do multiple scripts and writing an original script. I may call out if I need help. Again, thanks so much.
These are some good resources for finding training and consultants. Dive in!
Thank you. I will have a lot more questions, especially about
using scan bar codes to look up values of collectibles. Hope
someone will be as helpful as this community has.
The Definitive Disc Jockey
On Mon Aug 22 09:57:48 CDT 2016, TSPigeon