Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Record Commit


dante_in_calgary
 Share

Recommended Posts

Hi folks,

I am having trouble with getting records to commit (or I misunderstand the commit concept).

 

I have a layout that has several relational calculations. If I change certain fields the others do not recalc until I click my mouse in them or until I exit the record and then come back to it.

 

I created a button to Record Commit but it doesn't work.

 

Any thoughts or ideas on how to get the record to commit without having to completely exit the record and return to it? I'll start to play around with script triggers to see I can find success.

 

Thanks folks

Sean

Link to comment
Share on other sites

Hi folks,

I am having trouble with getting records to commit (or I misunderstand the commit concept).

 

I have a layout that has several relational calculations. If I change certain fields the others do not recalc until I click my mouse in them or until I exit the record and then come back to it.

 

I created a button to Record Commit but it doesn't work.

 

Any thoughts or ideas on how to get the record to commit without having to completely exit the record and return to it? I'll start to play around with script triggers to see I can find success.

 

Thanks folks

Sean

 

Sean,

 

You may not have a commit problem at all. Only calculation fields recalculate dynamically. Fields that are auto-enter and are NOT checked "Do not replace existing values of fields", only update when the feeder values in the auto-enter calculation change.

 

Clicking in an auto-enter calc apparently forces the update. When you exit the record and return, some confluence of values forces the auto-enter calc to update.

 

At least that is what I would check first. Commits have nothing to do with forcing calculations, as far as I know.

Link to comment
Share on other sites

If I change certain fields the others do not recalc until I click my mouse in them or until I exit the record and then come back to it.

I'll start to play around with script triggers to see I can find success.

 

I suspect that a display refresh is all you're missing. Since entering the field in question with a mouse click is sufficient, you could script a similar action with a 'Go to Object', then return to the starting field.

Link to comment
Share on other sites

Thanks folks. Looks like a script trigger OnObjectModify to "refresh window" did the trick. I'll have to read up to understand record commit more as I obviously misunderstand the concept.

 

Cheers

Link to comment
Share on other sites

  • 1 month later...

Hy Guys,

 

after having read and learned loads of stuff here, i finally have a question to post:

 

short version:

i have a calc which doesn't update when I

  • commit the record (neither by clicking nor by scriptstep)
  • refresh the window (incl. flush cache)
  • reenter the record and commit again

BUT: it does update immediately when I make a change to the record and then commit it

 

It should update when I delete a related record through a portal..

I don't know whether or not this is obvious, but I'd like to have a different solution than scripting a "change random field forward and back"

 

 

Long version:

I have a fairly complex Address-DB I'm working on, connecting "People" over -"Employment" - "Agency"- with "Address"

(yes, many People work at the same Institution in different Agencies)

 

Now I have a field in "People" for the favored AddressID which is a calculation(always) checking whether

  • there is a valid AddressID manually set
  • the current AddressID is valid (pointing to an existing address)
  • or else taking any random related AddressID (ensures that there is always a favored AdressID as long as there is any address related to this Person

second I have the mentioned field for "manually" entering a specific AddressID. This field is set with a Autoenter(always/replace) calc which sets itself to blank if the contained AddressID isn't valid anymore

 

Everything set up nicely for the worst case when somebody deletes the manually entered favored address to provide a new favored Address (no, I don't want to handle this when I delete an Address)

 

(The respective validation is done via a related Valuelist)

 

And hey it works without any problems for the "PhoneContacts" and the "NetContacts" (which are related directly to the "Person")

 

but with the Addresses it only wants to update when I make a change in the "Person" Record

Has anyone a clue how i could script that properly?

Link to comment
Share on other sites

Did you read what kirkrr said in post 2? It sounds like you have an auto-enter calculation option on a field, and that the behavior that you WANT is the behavior of a calculation field. Change it from text (or number or date or whatever type of field it is) with auto-enter calculation to CALCULATION FIELD of the result type of your original field type.

Link to comment
Share on other sites

yes I did read that and I know that for the field where I can manually enter a specific AddressID I do have a text field with an autoenter calc which replaces outdated entries therein. But the other field is a proper calculation field

 

I've choosen this setup carefully, because eventough I want to have a field which always automatically updates a valid "favorite-AddressID" i still want to be able to set such an ID manually, which is impossible in an calculation-field. To solve this I provided a second field for placing an ID there, so the first field can check if there is something and take it if its valid

 

the autoenter calc in the second field is almost only housekeeping

 

my problem is the proper calculation-field which only updates if i make changes

Link to comment
Share on other sites

That's odd. You mean even if you CLICK IN IT it does not update until you change something?

 

Calc fields in FileMaker can be "lazy" and require a screen refresh to "catch up"; sometimes you have to do somethign like Enter Find Mode followed by Enter Browse Mode; but you should not have to modify additional data to get the calc field to 'wake up'!

Link to comment
Share on other sites

Yes, that's it, even if I click in it it doesn't change..

 

when I modify the "Person"-Record and commit this change, then it changes its value which is shown when i click in it or refresh the window..

 

I will cut my file down, so i can upload it..eeeh not here, but I'll post a link.

Maybe it's an issue of the separation model I'm using although it souldn't..

Link to comment
Share on other sites

alright.. I've rewritten the calculation from scratch and now it does change..

 

is anybody interested in a nice method to flag a record in a portal with "favorite" as in "this is my favorite address, all the others are just nice to know" (i think it's getting off-topic smiley-tongue-out)

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use