April 13, 201213 yr 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:
April 13, 201213 yr Author 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
April 13, 201213 yr 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.
April 13, 201213 yr Author i understood as you said have to learn about look ups can you please give me example of it .
April 13, 201213 yr You can read about lookups in the Filemaker Help system here: http://www.filemaker...onal.11.22.html I'd suggest that you set up a separate database to play with and get to understand how lookups work, rather than working live in your 40,000,000 values. HTH Brian
April 13, 201213 yr 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.
April 13, 201213 yr Author wow above calculation is excellent can anyone give me lookup function example file in .fp7 format plz :hmm:
April 13, 201213 yr 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
Create an account or sign in to comment