July 10, 200817 yr how can i check a value calculated within my script to see if it matches a field in any record, not just the current one?
July 10, 200817 yr Is it that you want the script to stop when it finds a record that doesn't match? Go to Record/Request(first) Loop If(Variable<>Field) Pause Script Else go to record/request(Next, Exit after last) endif endloop *** I haven't run this script so it may need some tweaking. It's just the general idea. Btw, if this is a really large database this could take a long time. If this is not what you are asking please give a more detailed explanation of what you are looking to accomplish. hth
July 11, 200817 yr or you can set the value to a variable, and pop open a new window (off the viewable screen if you like) and perform a find to see if it returns a found set. Opening a new window will preserve your last found set and record that you were viewing in the old window. After checking, you can have the script close the popup window. Another option is that you could set a global field with the value, create a new relationship to a new table occurrence and check to see if there are any related records.
July 11, 200817 yr Great John. The global sounds like it would be the fastest and easiest to deal with. But, we still need to understand what he is ultimately looking to accomplish with the results, don't you think? Al
July 11, 200817 yr Author wow you guys are fast! sorry i was in bed! basically in'm inserting lines into a sales list but want all my field line_id to be unique, it auto enters normally but i'm writing a script to insert lines. this works by adding a decimal place to the current line ie line 45 would have 45.1 inserted after it. this works great unless you try to insert a line in the same place more than once. therefore i want to check whether the line number i'm about to insert already exists. if not i add 1 to it until it does. i think ill have a look at the global route for now, thanks for the help!
July 11, 200817 yr Author so how should i set up this related global field? should the global be in the same table as the line id?? should the relationship be via 2 separate occurrences of the table? (the line id is already linked for another purpose) how do i equate whether it links to a record via logic?
Create an account or sign in to comment