Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Posted April 13, 2012 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:
Vaughan Posted April 13, 2012 Posted April 13, 2012 Read up on look-ups. What you're doing sounds wrong.
Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Author Posted April 13, 2012 Read up on look-ups. What you're doing sounds wrong. didn`t get it :hmm:
Ocean West Posted April 13, 2012 Posted April 13, 2012 please provide a bit more details on your goal?
Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Author Posted April 13, 2012 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
Vaughan Posted April 13, 2012 Posted April 13, 2012 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.
Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Author Posted April 13, 2012 i understood as you said have to learn about look ups can you please give me example of it .
Vaughan Posted April 13, 2012 Posted April 13, 2012 Type "filemaker lookup" into Google and click search.
brian rich Posted April 13, 2012 Posted April 13, 2012 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
Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Author Posted April 13, 2012 i respect your suggestion
Ocean West Posted April 13, 2012 Posted April 13, 2012 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.
Dr.Gopala krishnam raju AMBATI Posted April 13, 2012 Author Posted April 13, 2012 wow above calculation is excellent can anyone give me lookup function example file in .fp7 format plz :hmm:
brian rich Posted April 13, 2012 Posted April 13, 2012 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 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now