Execution: Setting up the Scripts and actions

Ok, now assuming that your Friends and Contacts tables are populated with data on which to search (and you might wish at this point to enter some dummy data to test these), we can build the scripted routines, through the Scripts menu, which identify and return the required values. The following are the steps and what you should see on the screen as the result of each action.

First, go to: Scripts> ScriptMaker> New, then follow these steps, using the menu on the left. Note that items in bold text prefixed by hash (#) symbols are inserted as instructions (or 'Comments', as found in the menu) to myself. (The complete search instruction is included in the appendix of this piece).

Start the search routine

  1. Go to Layout and Go to Field take you to the entry text field, 'Search', whereupon the script pauses until the user enters the text string in the Search field, and reactivates it with the 'continue' button
  2. The text string is then 'set' in the gSearch field, whose value, being a global field, unlike a text field, is retained and available for use within both 'Browse' and 'Find' modes. As there is no need to use the Search field until the next new search, this can then be cleared of its value.
  3. Set Error Capture [On] enables the script to accept errors (that is, at allows for an inability to find appropriate records) without throwing up error messages prior to the conclusion of the entire script.
  4. Finally, at the conclusion of this part of the script, by imposing the Pause/Resume Script [Indefinitely] step, the result beneath will be returned so you can check your work. Once you are happy everything is working as intended, all such Pause steps can be removed safely.

You can see here that because of the pattern match on the text string 'rich' in gSearch, the records found are returning the value '1' in the field cIfMatchComposite.

Import these records into the SearchReturn table

These records need next to be imported into the SearchReturn table, matched against the fields beneath. The Import Records dialog box will guide you through the matching of tables and fields, as shown beneath.

Do you need help with Mac? Gain advice from Builder AU forums

Related links

Comments

1

Emile - 13/07/06

OOoooo, this is a great technique. Is there any way you can provide a sample file download to better illustrate how it works? Thanks

» Report offensive content

2

ianj - 03/10/06

One quick comment about the table names. Using a "." character in a table name or a field name has the potential to cause untold grief if you need to web-enable the system or connect via ODBC/JDBC. It's generally a really bad idea.

ian

» Report offensive content

3

Ender - 25/11/06

I'm afraid I don't see the need for techniques like this that search across multiple tables. Tables should really be about different things. If you have two tables with similar types of things, then the tables should probably be combined (especially if they may need to be shown together in a common listing or report).

In this example, "Friends" and "Contacts" should really reside in the same table, with a Contact Type field used to distinguish between them. This structure would make this search and listing quite simple, with no additional tables or import scripts required.

» Report offensive content

4

yusuf alam - 24/01/07

I want to search the record from the existing table from the oracle database using visualbasic programe and it will display the result in to the text box
select * from student where st_roll =" ' text1.text ' "

» Report offensive content

Leave a comment

You must read and type the 6 chars within 0..9 and A..F

* indicates mandatory fields.

4

yusuf alam - 24/01/07

I want to search the record from the existing table from the oracle database using visualbasic programe and it will display ... more

3

Ender - 25/11/06

I'm afraid I don't see the need for techniques like this that search across multiple tables. Tables should really be ... more

2

ianj - 10/03/06

One quick comment about the table names. Using a "." character in a table name or a field name has the ... more

Log in


Sign up | Forgot your password?

  • Staff Microsoft shows off IE9 preview

    This week, highlights from Microsoft's MIX10 conference and more in the Roundup. Read more »

    -- posted by Staff

  • Chris Duckett IE9's H.264 vote killed Ogg

    In a split decision by the judges, the winner of the W3C/WHATWG video codec consensus is H.264, taking home the future of video playback on the internet while loser Ogg goes home with nothing but thoughts of what might have been. Read more »

    -- posted by Chris Duckett

  • Staff Google launches Apps Marketplace

    Google launches and app store, while Mozilla plans to re-write its open-source license. More of this week's news in the Roundup. Read more »

    -- posted by Staff

What's on?

  • Optus Deal

    Broadband + home phone + PlayStation®3 in a single package price!