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

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

Recommended Posts

Posted

I have a script that searches the "set" field, that works properly. The script is this:

Show Custom Dialog ["Search Cards"; "Input the search criteria you want!"; Magic::Quickfind]
Perform Quick Find [Magic::Quickfind]
Set Field[Magic::Quickfind]

If I put in a name of a deck it finds every card in the deck. Then I have another button after I am in the found set to search by color. This is were the problem lies. It will take the color that is already showing on the record in view and use that and it will work. But if I put another color in, it starts showing me all the records that I have in the entire database. I have 23,106 records so many times the count gives me up to 12,000. I am not sure how to constrain the search. Here is the code:

Show Custom Dialog ["Color"; "Search by Color."; Magic::Color]
Perform Quick Find [Magic::Color]
Set Field [Magic::Quickfind]

Quickfind is a Global Text field.

Posted

there is a constrain found set script step that you can use. (instead of perform find)

M

Posted

Thank you I tried that. Here is what I put:

Show Custom Dialog["Color", "Search by Color."; Magic::Color]
Constrain Found Set [Restore]
Set Field [Magic::Color]

It still tries to find the color that is already showing on the screen for that current record. If I type a color in I get this error:

 

"The provided find criteria is not valid. Enter a valid request before proceeding."

Posted

The set field statement doesn't do anything.

 

A set field statement takes two properties; which field are you setting; what value are you setting?

 

It is like saying "set this field to this value"

 

But you aren't doing that you're only saying "set this field"

 

FileMaker is left wondering.

Set this field to what?

Posted

That is a problem. I don't want to set a field. I want to be able to do another find after I am in a found set. But when I get in the found set and click my button to search for a color it takes the color that is already there and put it in the search bar. If I put a color in the serach box it replaces what was there.

Posted

If you don't want to set a field then why are you setting a field?

 

Why is the script step even there?

 

But - if you are trying to perform a find - you MUST set a field.

 

FileMaker has to know what field you are searching; for what value.

Posted

Show Custom Dialog ["Search Cards"; "Input the search criteria you want!"; Magic::Quickfind]
If[ get(lastmessageChoice) = 1]

Enter Find Mode

Set Field [Magic::Color; Magic::Quickfind]

Constrain Found Set []

End IF

Posted

Ok, I am still missing something. The find is not working. When I go in a search for a set like "Dragon's Maze" I get that. But then I want to search colors in the set of Dragon's Maze and it does not give me that. It wants me to modify and when I do it gives me all the cards that color. I am attaching an example of what the database looks like.

Magic_FMForum.zip

Posted

But the database does not have the script installed.

 

And it doesn't have the quickfind field.

 

And all the scripts are full of errors and references to fields that don't exist.

  • Like 1
Posted

Sorry. Here is the updated one. I had to delete 24,000 records first. There are 5 records in there. I would like to be able to search any field after a set is found. This example shows Dragon's Maze as the set. The C is for color is the main one I would like to be able to search by after a set is found. Thank you.

Magic_REVA_FORUM.zip

Posted

The script is posted above. (message #7)

 

Set up the file with THAT script.

 

If it still doesn't work, post the file; with that script installed.

Posted

Here is your file with a constrain on color. The script above was correct. However you needed to specify the color field for a constrain. Not the quickfind field, which is how I think you tried it. You will find a new script and button on your layout. 

Magic_REVA_FORUM Fixed.zip

Posted

Ok, I did as requested. Here is what it is doing. I added a 6th record called Ravnica. I click on Search Cards and type in Dragon's Maze. I get no records match this find criteria and record six now shows Dragon's Maze in the color slot instead of the Color slot. If I click on continue I get 0/6 Found (unsorted). If I modify the find and put in "R" for the color it gives me the 1 card that has red in it, so that part looks like it works. Here is the program again with the updated script. I put it on the button "SEARCH CARDS". Thank you.

Magic_REVA_FORUM Copy.zip

Posted

Your request was to do a constrained search on color after a different find operation was used to find a card set.

 

Why did you attach the color search script steps to the card search script?

 

Also: did you look at the two example files posted above?

Posted

I apologize. I did not download your last update. Everything is working great now. Sorry I know I wasted your time at the end. Thank you very much for your patience and guidance.

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