kibber Posted October 11, 2005 Posted October 11, 2005 (edited) 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, 2005 by Guest I'm an idiot
mr_vodka Posted October 11, 2005 Posted October 11, 2005 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.
mr_vodka Posted October 11, 2005 Posted October 11, 2005 Take a look at your modified file. i made a few changes just so that you can follow the process better. -John Eider.zip
kibber Posted October 11, 2005 Author Posted October 11, 2005 (edited) 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, 2005 by Guest english
mr_vodka Posted October 11, 2005 Posted October 11, 2005 Kibber, dont worry about it. I was just teasing ya. Always happy to help out those using FileMaker. :)
kibber Posted October 11, 2005 Author Posted October 11, 2005 (edited) 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, 2005 by Guest
Calantha Posted October 13, 2005 Posted October 13, 2005 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?
mr_vodka Posted October 13, 2005 Posted October 13, 2005 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.
Calantha Posted October 13, 2005 Posted October 13, 2005 Is there a quick way to clear all fields or will I have to script the clear for each individual field as well?
mr_vodka Posted October 13, 2005 Posted October 13, 2005 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.
Calantha Posted October 13, 2005 Posted October 13, 2005 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!
Calantha Posted October 13, 2005 Posted October 13, 2005 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...
mr_vodka Posted October 13, 2005 Posted October 13, 2005 It is still a global text or number field correct? It should only be a calculated value, not a global calculation field.
Calantha Posted October 13, 2005 Posted October 13, 2005 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?)
mr_vodka Posted October 13, 2005 Posted October 13, 2005 Calantha, Please take a look at the example to see the method I am talking about. global_clear.zip
Calantha Posted October 13, 2005 Posted October 13, 2005 I thank you for your help, but when I hit clear globals nothing happens.
mr_vodka Posted October 13, 2005 Posted October 13, 2005 Please download the new file and try again. I dont know why it is not working for you...
Calantha Posted October 13, 2005 Posted October 13, 2005 Still not working, and when I hit reset I get a bunch of error messages about my privilege set.
mr_vodka Posted October 13, 2005 Posted October 13, 2005 Very strange. Try opening the file with the Admin user name. There is no password. Hold down shift while you are opening the file
Calantha Posted October 13, 2005 Posted October 13, 2005 I've noticed that the flag changes from 2 to 0 when I hit the button but all the global fields remain.
Calantha Posted October 13, 2005 Posted October 13, 2005 Now when I open it there is no content in the global fields.
mr_vodka Posted October 13, 2005 Posted October 13, 2005 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.
Breezer Posted October 16, 2005 Posted October 16, 2005 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.
Recommended Posts
This topic is 6981 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