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

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

Recommended Posts

Posted

OK, so I am probably making this harder than it should be, but here is the scenario.

I have a button called, "affiliate": when you click this button it is supposed to search all the records within the table for all exact matches of the affiliate under the "affialates" field.

For example, I am on record #33526 and the affiliates field is eg. "Pizza Hut" (The one in your hometown for an address). When I click the affiliate button, i want to do a find for all the "Pizza Huts" in my database and return them in a table view?

How do i do this?

I am using a script "perform find" but my criteria is wrong?

Please help

Thanks

Posted

OK, so I am probably making this harder than it should be, but here is the scenario.

I have a button called, "affiliate": when you click this button it is supposed to search all the records within the table for all exact matches of the affiliate under the "affialates" field.

For example, I am on record #33526 and the affiliates field is eg. "Pizza Hut" (The one in your hometown for an address). When I click the affiliate button, i want to do a find for all the "Pizza Huts" in my database and return them in a table view?

How do i do this?

I am using a script "perform find" but my criteria is wrong?

Please help

Thanks

Posted

OK, so I am probably making this harder than it should be, but here is the scenario.

I have a button called, "affiliate": when you click this button it is supposed to search all the records within the table for all exact matches of the affiliate under the "affialates" field.

For example, I am on record #33526 and the affiliates field is eg. "Pizza Hut" (The one in your hometown for an address). When I click the affiliate button, i want to do a find for all the "Pizza Huts" in my database and return them in a table view?

How do i do this?

I am using a script "perform find" but my criteria is wrong?

Please help

Thanks

Posted

Copy [affiliates]

Enter Find Mode

Insert Text [affiliates =]

Paste [affiliates]

Perfom Find

Note the addition of the inserted "="

Posted

Copy [affiliates]

Enter Find Mode

Insert Text [affiliates =]

Paste [affiliates]

Perfom Find

Note the addition of the inserted "="

Posted

Copy [affiliates]

Enter Find Mode

Insert Text [affiliates =]

Paste [affiliates]

Perfom Find

Note the addition of the inserted "="

Posted

thank you dwins, i tried it out and it works about 90% the way i want it too. I need an exact match...

with what you gave me i tested it using "hilo" in a few records and "hilooo" in a record and when i clicked the button to perform the script both "hilo" and "hiloo" showed up....can i do an exact match this way or no?

Posted

thank you dwins, i tried it out and it works about 90% the way i want it too. I need an exact match...

with what you gave me i tested it using "hilo" in a few records and "hilooo" in a record and when i clicked the button to perform the script both "hilo" and "hiloo" showed up....can i do an exact match this way or no?

Posted

thank you dwins, i tried it out and it works about 90% the way i want it too. I need an exact match...

with what you gave me i tested it using "hilo" in a few records and "hilooo" in a record and when i clicked the button to perform the script both "hilo" and "hiloo" showed up....can i do an exact match this way or no?

Posted

Copy and Paste are layout dependent (the fields must be on the current layout when the script is performed) and using them like this destroys the contents of the clipboard (of which the user took trouble to put there). There are ways to save the clipboard, but nothing beats avoiding the problem altogether! This soultion requires a global field to store the search criteria... gAffiliates:

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Set Field [ affiliates ; "==" & gAffiliates ]

Perform Find []

Note that the "==" prepended to the search criteria forces an exact field content match.

Set Field only works if the calculated string is valis for the field's data type, so it won't work for dates because ">1/1/2005" is not a valid date. In this case the Insert Calculated Text step will do the job, but this is layout dependent. In this case the script would be...

Freeze Window

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Go to Layout [ <layout with field on it> ]

Insert Calculated Result [ affiliates ; "==" & gAffiliates ]

Go to Layout [ original layout ]

Perform Find []

Posted

Copy and Paste are layout dependent (the fields must be on the current layout when the script is performed) and using them like this destroys the contents of the clipboard (of which the user took trouble to put there). There are ways to save the clipboard, but nothing beats avoiding the problem altogether! This soultion requires a global field to store the search criteria... gAffiliates:

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Set Field [ affiliates ; "==" & gAffiliates ]

Perform Find []

Note that the "==" prepended to the search criteria forces an exact field content match.

Set Field only works if the calculated string is valis for the field's data type, so it won't work for dates because ">1/1/2005" is not a valid date. In this case the Insert Calculated Text step will do the job, but this is layout dependent. In this case the script would be...

Freeze Window

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Go to Layout [ <layout with field on it> ]

Insert Calculated Result [ affiliates ; "==" & gAffiliates ]

Go to Layout [ original layout ]

Perform Find []

Posted

Copy and Paste are layout dependent (the fields must be on the current layout when the script is performed) and using them like this destroys the contents of the clipboard (of which the user took trouble to put there). There are ways to save the clipboard, but nothing beats avoiding the problem altogether! This soultion requires a global field to store the search criteria... gAffiliates:

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Set Field [ affiliates ; "==" & gAffiliates ]

Perform Find []

Note that the "==" prepended to the search criteria forces an exact field content match.

Set Field only works if the calculated string is valis for the field's data type, so it won't work for dates because ">1/1/2005" is not a valid date. In this case the Insert Calculated Text step will do the job, but this is layout dependent. In this case the script would be...

Freeze Window

Set Field [ gAffiliates ; affiliates ]

Enter Find Mode []

Go to Layout [ <layout with field on it> ]

Insert Calculated Result [ affiliates ; "==" & gAffiliates ]

Go to Layout [ original layout ]

Perform Find []

Posted

... along Vaugan's lines, there is nothing like putting a "variable" global field of each type (text, number, date, container) in a database (or table, in the FMP7 lingo) in advance, to use for these types of situations. The situations arise more often than expected, and the fields are always useful. The bonus is that they do not take up much space if not used, and if they are not used, they are easily removed from the system...

-Stanley

Posted

... along Vaugan's lines, there is nothing like putting a "variable" global field of each type (text, number, date, container) in a database (or table, in the FMP7 lingo) in advance, to use for these types of situations. The situations arise more often than expected, and the fields are always useful. The bonus is that they do not take up much space if not used, and if they are not used, they are easily removed from the system...

-Stanley

Posted

... along Vaugan's lines, there is nothing like putting a "variable" global field of each type (text, number, date, container) in a database (or table, in the FMP7 lingo) in advance, to use for these types of situations. The situations arise more often than expected, and the fields are always useful. The bonus is that they do not take up much space if not used, and if they are not used, they are easily removed from the system...

-Stanley

Posted

In ScriptMaker, select the Set Field step.

There are two buttons at the lower right corner. Click on the top one, and select the target field. Click on the bottom one and enter a calculated result - this will put into the target field.

When you're done, the Set Field step will reflect your choices. It will look like:

Set Field [Table::Targetfield; Calculation].

Posted

In ScriptMaker, select the Set Field step.

There are two buttons at the lower right corner. Click on the top one, and select the target field. Click on the bottom one and enter a calculated result - this will put into the target field.

When you're done, the Set Field step will reflect your choices. It will look like:

Set Field [Table::Targetfield; Calculation].

Posted

In ScriptMaker, select the Set Field step.

There are two buttons at the lower right corner. Click on the top one, and select the target field. Click on the bottom one and enter a calculated result - this will put into the target field.

When you're done, the Set Field step will reflect your choices. It will look like:

Set Field [Table::Targetfield; Calculation].

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