Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (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 by Guest
I'm an idiot
Posted

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.

Posted

Take a look at your modified file. i made a few changes just so that you can follow the process better.

-John

Eider.zip

Posted (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 by Guest
english
Posted

Kibber, dont worry about it. I was just teasing ya. Always happy to help out those using FileMaker.

:)

Posted (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 by Guest
Posted

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?

Posted

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.

Posted

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.

Posted

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...

Posted

It is still a global text or number field correct?

It should only be a calculated value, not a global calculation field.

Posted

Please download the new file and try again. I dont know why it is not working for you...

Posted

Very strange. Try opening the file with the Admin user name. There is no password.

Hold down shift while you are opening the file

Posted

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.

Posted

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.

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 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.