Jump to content

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

Recommended Posts

Posted

i made 40million unique id each 4types each

and i want to use case() script for it ,so that if i enter a value in one field automatically other 3 fields must get the values which i assigned using case() function

--- is it possible to do it using case() as script box limits to 30000 characters only? ???

---is there any other method to it ???

i hope my 40million id creation hardwork doesn`t go waste :idot:

Posted

Read up on look-ups.

What you're doing sounds wrong.

Posted

i have 4 tables each table with identification number .

i want each table to have unique number which i specially with numbers characters and symbols.

for eg--- table1---id=123456

table2---id=asdfgh

table3---id=098765

table4---id=n6hj87

case(

table1 id="123456";"asdfgh";

)

case(

table2 id="asdfgh";"098765";

)

case(

table3 id="098765";"n6hj87";

)

hope you got it i want preassign table1,table2,table3 and table4 id and as i enter id into table1 tab2,tab3,tab4 must automatically get there id s calculated based

on table1 id i made 10million table1 id so totally 40million ?

hope i am clear now

pls ignore above script mistakes its not about scripting i want a way as script box doesn`t allow >30000 characters i want an alternative

Posted

Putting in dummy data doesn't help.

Explain what you want to do, NOT how you think it should be achieved. Real data helps enormously

"I have a table of 40,000 drugs, each one is unique, and each drug has four pieces of information (dosage per kg of body weight, minimum age of patient, main side effect, number of days to administer the drug) and I want to select a drug and have all four pieces of information be entered automatically into a patient record."

I still stand by my suggestion to learn about look-ups.

Posted

Type "filemaker lookup" into Google and click search.

Posted

i would explore using a UUID custom function




Let ( 

[

hexVals = "0123456789ABCDEF";

d1 = GetAsNumber(Get(CurrentHostTimeStamp));

d2 = Div (d1; 16);

d3 = Div (d2; 16);

d4 = Div (d3; 16);

d5 = Div (d4; 16);

d6 = Div (d5; 16);

d7 = Div (d6; 16);

d8 = Div (d7; 16)

];



Middle(hexVals; Mod (d8; 16) + 1; 1) &

Middle(hexVals; Mod (d7; 16) + 1; 1) &

Middle(hexVals; Mod (d6; 16) + 1; 1) &

Middle(hexVals; Mod (d5; 16) + 1; 1) &

Middle(hexVals; Mod (d4; 16) + 1; 1) &

Middle(hexVals; Mod (d3; 16) + 1; 1) &

Middle(hexVals; Mod (d2; 16) + 1; 1) &

Middle(hexVals; Mod (d1; 16) + 1; 1) &



"-" &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

"-" &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

"-" &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

Middle(hexVals; Int(Random*16)+1; 1) &

"-" &

Upper(Substitute(GetValue(Get ( SystemNICAddress );1); ":"; ""))

)

This will generate a base 64 unique ID that can be used as auto enter for each table any record created will be assigned:

C719B3E1-657C-FCCE-A7F6-C42C03067A68

use this value as a key between any relationships.

Posted

With respect, you'll learn more by building you own, however if you need to look at an example...

Use the New database from starter solution option in Filemaker, and create a copy of the Invoices database. Look in the line items table. The fields Reorder level and Taxable perform lookups into the Related Products table.

HTH

Brian

  • Like 1

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