1 of 1 people found this helpful
If you are using an older version of FileMaker you should have a script trigger on the field refreshing the entire record. This will work but it is better in the latest versions of FileMaker.
In FileMaker 14 you should use the "Refresh Portal" script step. If it is not a portal then use the "Refresh Object" (for conditional formatting etc).
You shold name the portal after a good set of conventions, so that you are sure that you are refreshing the right portal:-) here I am just using the name [members_portal_01]
This is much better than refreshing the entire window, much less data transferred, faster and intelligent.
The script steps that will refresh your portal
Depending on your version of FileMaker you may have only the "Refresh Window". It will do the job, but if you have FileMaker 13 or 14 I strongly recommend "Refresh Portal".
Naming your portal
The script step as it should look (with your object name instead of [members_portal_01)
* And you may ask, why the "01" after the portal object name?
Because you may have more than one portal on the layout referring to the same TO.
Hope that this is a help?
Fm Pro Adv 13.0v3
Great stuff! Later this morning I will digest it and see how far it gets me.
I will be back with praise or praise and questions.
Please shoot; I will be ready!
BTW: Which version of FileMaker are you using?
I've not had much luck using Refresh Object or even Refresh Portal in similar situations. However, Daniel Wood of Digital Fusion once wrote about adding a constant to the relationship.
I have a field in every table called constant_1 and defined as Auto-Enter/Data: 1
You can add these fields to your relationship TABLE1::constant_1 = TABLE2::contant1. Again, add this to your existing relationship definition.
Using a script trigger, add a line Set Field [ TABLE2::constant_1 ; 1 ]
This should update the portal.
There may be situations where the portal refresh does not work, but in the situations where we have used it it seems to work fine. Maybe if the relations used by the portal is many TO's away?
I would definitely start by using the Refresh Portal ... and only if this does not work I would try other methods.
1 of 1 people found this helpful
I had a similar problem before and i went through the same situation trying to refresh the portal as i created new records.
The way i solved the problem was easy... i just inserted the instruction "Commit Records/Request" at the end of the script.
I hope this helps
Hi Philipe, you are right. If the data is not committed to the database it will not be reflected in the Portal.
I didn't realize Daniel updated his article.
There may be situations where the portal refresh does not work...
Unfortunately, when it hasn't worked, I moved to the other method (TABLE1::constant_1=TABLE2::constant_1) because I know that works.
What I'd like to do is stop development, fork the database, strip out the client data, populate it with fake data, move it to my test server (over the WAN), and try to figure out why it doesn't work. But I don't. I use something that works and keep moving on the client stuff.
When FMP 13 came out there was a new script step called Refresh Object. I thought this would refresh the portal, since it says, "If the specified object is in a portal, Refresh Object updates the object in every visible portal row." I thought that would allow a portal refresh without dumping the cache, but I was never able to make that work the way I expected (note that my expectation may be the problem and not the script step).
I found the same thing with Refresh Portal, but again, I haven't documented when it didn't work and spend the time to figure out why.
But you mentioned that you have used it and it seems to work fine, so it could be a PICNIC issue (Problem In Chair, Not In Computer).
I have FMPA 13.0 v3, but could not find REFRESH PORTAL. (Upgrading to FMP/FMPA 14 is not an option.)
Do I need to update to a different version of FMPA 13.0 or do something else to make REFRESH PORTAL available in FMPA 13.0 v3?
Background: My desire is to type the first few letters of a company's name in a global field and click on a button to populate a portal with an alpha-sort of my customers' names starting with the first few letters typed in the global field. Everything works PERFECT except the only way to refresh the portal is to first click on any field before clicking on the button.
To everyone who tried to help,
I really appreciate your trying to help.
Unfortunately, the cure will kill the patient long before the disease will; so to speak.
I will continue to click on a field before clicking on the button and move on to slaying other dragons.
Thanks again for all your help.