October 11, 200520 yr Before I get started I just wanted to thank mr_vodka (whom I forgot to mention) Ender, Inky Phil and comment for getting me this far. I have three tables Client _ClientID FirstName LastName H.Address g.clientID Property: _PropertyID HouseName HouseAddress Ownership: _OwnershipID ClientID PropertyID I within the client table I have a property assign layout. You hit the button and the P.Assign layout pops up and you choose the address. Then you hit the button and you are returned to the client layout. After you have selected the property via the address you will hit the button to 'set' and the script runs, creating a new record in the ownership layout which ties the clientid of the person you were just looking at with the propertyid of the address you just selected, and then returns you to the client layout. This is the direction I am heading in: go to layout - ownership new record/request set field - ownership::propertyID getfield (property::_propertyid) set field - ownership::clientID getfield (Client::g.clientid) commit record/request go to layout - client As you can probably see my script writing is not entirely up to par Eider.zip Edited October 11, 200520 yr by Guest I'm an idiot
October 11, 200520 yr No love... sniff sniff... Kibber, In your script, both your scripts get rid of the GetField Function in the SetField steps. Also in the 'Set Selected Name on Property' script you want to set the property to gPropertyID, but you dont set gPropertyID anywhere before hand.
October 11, 200520 yr Take a look at your modified file. i made a few changes just so that you can follow the process better. -John Eider.zip
October 11, 200520 yr Author Sorry John aka mr_vodka, I feel horribly that I forgot you in my list. I am terribly sorry to not have given you the credit which you so rightly deserve. Very embarassing, indeed. I am looking at your attachment now. Thanks for still helping me even after my goof. Edited October 11, 200520 yr by Guest english
October 11, 200520 yr Kibber, dont worry about it. I was just teasing ya. Always happy to help out those using FileMaker. :)
October 11, 200520 yr Author Excellent, ok now I think I can spend some time making it look pretty....wait I should probably ask the boss if he wants anything else to change first Thanks again mr_vodka Oddly enough I know understand why you initially told me to include a unique ID in each of my tables...he he he Edited October 11, 200520 yr by Guest
October 13, 200520 yr I have a similar (but slightly unrelated) question. I have a form layout with global fields. The user enters in their data and hits a submit button which then creates a new record in the appropriate table, copies the data over and then returns them to the next page. I am using the Set Field function in order to transfer the information. However, there are probably close to one hundred fields. Will I need to use the Set Field function for every one or is there an easier way? I trial-ed and error-ed with a bunch of the scripts (copy record, select all & paste) but none of them seemed to provide me with the correct results. Ideas?
October 13, 200520 yr If there are that many fields, you can do a set field for each or maybe you can do an import into the other table from those globals fields to the matching entry fields. If you are going to do an import, sake sure that your record found set is 1 so that you dont import all the records.
October 13, 200520 yr Is there a quick way to clear all fields or will I have to script the clear for each individual field as well?
October 13, 200520 yr I was going to suggest one method right now, but then I looked and you have FM6 correct? My method only works in 7... :-( In 7 you have the option of having a calculated value for globals as well. If you create another global field gClearFlag, you can have the other global fields have a calculated value of, Case ( gClearFlag=1; "" ). This would allow all globals with this to default to null. However, as soon as I set gClearFlag to 1, in my clear script, I would set it to gClearFlag=0.
October 13, 200520 yr I'm actually using 8 pro... I just can't remember where I go to change my details. I will look into that and see. Thanks for the advice!
October 13, 200520 yr I've just tried this method and now that the calculation is set up in my global field I am unable to modify it because it is basing the field contents on the calculation...
October 13, 200520 yr It is still a global text or number field correct? It should only be a calculated value, not a global calculation field.
October 13, 200520 yr I think I need my fields to be global because I do not want to have to create records... (am I completely off-base here?)
October 13, 200520 yr Calantha, Please take a look at the example to see the method I am talking about. global_clear.zip
October 13, 200520 yr Please download the new file and try again. I dont know why it is not working for you...
October 13, 200520 yr Still not working, and when I hit reset I get a bunch of error messages about my privilege set.
October 13, 200520 yr Very strange. Try opening the file with the Admin user name. There is no password. Hold down shift while you are opening the file
October 13, 200520 yr I've noticed that the flag changes from 2 to 0 when I hit the button but all the global fields remain.
October 13, 200520 yr Lets take this to a private topic until I can figure out why you arent seeing the results. i will send you a private topic.
October 16, 200520 yr I would use the New Window[] script step to preserve the current found set or status quo of the user's screen and then "Get (ScriptParameter)" to set the secondary key. When user is done with the selection, close Window []. I will look at your file on monday since I'm currently working remotely.
Create an account or sign in to comment