Jump to content

script/calculations


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

Recommended Posts

i need to know how to do something. right now the database has a few fields, Fristname, Lastname, OS, Memory, and userid. i set up a calc field that takes all those fields and list them in a string. so what i need now is a calc that will look throught the database records and find records that have like 2 things in common. like as you fill in the fields on a record you have a field that is showing the record numbers that have the same string info..

does that make any since?

Link to comment
Share on other sites

ok, like the memory and the os might be the same. the purpose for this is that if a person calls and is having problems with software then someone can enter in some of the computer specs and the problem discription and get a list of other records that have the some of the same characteristics, thus making solving the problem easier. most of the fiels will be drop down menues so that the values will be excatly the same.

so like can i have something that will look through all the records and list the ones where 2 or more fields are the same as those fields in the current record.

Link to comment
Share on other sites

yea, i thought of that... ummmm

i have that calc field and it looks like this

fields = firstname, lastname, os, memory, processer, problem, userid

"John Doe Win98 64mg 550mhz crashes 12"

i just need a way to like have a button that says find like records or something. and it will find records where..

os = win 98 AND memory = 64mg

OR

os = win 98 AND problem = crashes

OR

os = win 98 AND processer = 550mhz

OR

memory = 64mg AND problem = crashes

OR

memory = 64mg AND processer = 550mhz

OR

processer = 550mhz AND problem = crashes

so it will find records where 2 of the fields match. but i dont want the end user to have to enter anything, i just want them to press that button.

Link to comment
Share on other sites

ok, i kinda have what i want now.. its a script that looks like this..

global = a global field

test = a global field

string = a calc field

userid = a calc field

----------------------------------------

Clear[select, "test"]

Copy[select, "string"]

Paste[select, "global"]

Go to Record/Request/Page [First]

Loop

IF ["LeftWords( global , 1 ) & LeftWords( global , 2 ) = LeftWords( string , 1 ) & LeftWords( string , 2 )"]

Copy[select, "User ID"]

Paste[select, "test"]

Insert Text["test", " "]

End If

Go to Record/Request/Page [Exit after last, Next]

End Loop

[This message has been edited by MadHatter (edited February 20, 2001).]

Link to comment
Share on other sites

ok, i did it, well most of it... let me share:

fields:

global = a global field

test = a global field

string = a calc field

userid = a calc field

the string field looks like this..

virtual memory, os, yes/no, firstname, lastname, item, userid

"On Win98 no 24 John Doe Black Pen A24MB"

-----------------------------------------

Clear[select, "test"]

Copy[select, "string"]

Paste[select, "global"]

Go to Record/Request/Page [First]

Loop

If["LeftWords( global , 2 ) = LeftWords( string , 2 ) or LeftWords( string , 1 ) & " " & MiddleWords( string , 3 , 1 ) = LeftWords( global , 1 ) & " " & MiddleWords( global , 3 , 1 )"]

Copy[select, "User ID"]

Paste[select, "test"]

Insert Text["test", " "]

End If

Go to Record/Request/Page [Exit after last, Next]

End Loop

-----------------------------------------

[This message has been edited by MadHatter (edited February 20, 2001).]

Link to comment
Share on other sites

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