March 16, 200520 yr Author 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
March 16, 200520 yr 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
March 16, 200520 yr Author 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
March 16, 200520 yr Copy [affiliates] Enter Find Mode Insert Text [affiliates =] Paste [affiliates] Perfom Find Note the addition of the inserted "="
March 16, 200520 yr Copy [affiliates] Enter Find Mode Insert Text [affiliates =] Paste [affiliates] Perfom Find Note the addition of the inserted "="
March 16, 200520 yr Copy [affiliates] Enter Find Mode Insert Text [affiliates =] Paste [affiliates] Perfom Find Note the addition of the inserted "="
March 16, 200520 yr Author 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?
March 16, 200520 yr Author 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?
March 16, 200520 yr Author 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?
March 16, 200520 yr 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 []
March 16, 200520 yr 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 []
March 16, 200520 yr 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 []
March 16, 200520 yr ... 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
March 16, 200520 yr ... 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
March 16, 200520 yr ... 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
March 16, 200520 yr In version 7, you can: Enter Find Mode [ ] Set Field [ Table::Datefield; ">1/1/2005" ]
March 16, 200520 yr In version 7, you can: Enter Find Mode [ ] Set Field [ Table::Datefield; ">1/1/2005" ]
March 16, 200520 yr In version 7, you can: Enter Find Mode [ ] Set Field [ Table::Datefield; ">1/1/2005" ]
March 17, 200520 yr Author how do i do this? i cant get this to happen? Set Field [ gAffiliates ; affiliates ] I cant use the semi-colon in there?
March 17, 200520 yr Author how do i do this? i cant get this to happen? Set Field [ gAffiliates ; affiliates ] I cant use the semi-colon in there?
March 17, 200520 yr Author how do i do this? i cant get this to happen? Set Field [ gAffiliates ; affiliates ] I cant use the semi-colon in there?
March 17, 200520 yr 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].
March 17, 200520 yr 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].
March 17, 200520 yr 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].
Create an account or sign in to comment