Portal refreshes in IWP are an issue. Entering a Key field value does not force a browser to refresh a portal on a web page the same way that the FileMaker app will refresh. (Even FMPro can fail to refresh portals in some cases unless you script a refresh window.)
Have you tried reloading the web page via a browser button after entering the global value?
Keep in mind that global values are retained from the last un-hosted single-user session when they are later placed on a server, and those values, if any, would become defaults in IWP.
thanks for the reply.
I figured out why I was not getting any records. The referenced file was not open (duh). I had to open it up in IWP from the home page and then the portal was populated. Is there no way around this?
How do I get the referenced file to open when user opens IWP?
Usually the realted file will open itself if both of these cases are met:
- the account name and password used to login to the file with the parent records matches an account in the file you want to open, the one containing the child/portal records, and
- there is some field or data on the first screen of the parent file that reads info from the other file. This might not be happening if the parent record's key field is empty.
If that second condition isn't met until someone enters a value in your global field, then you might hit the portal refresh problem before a relationship has been established.
I suggest you check the relationships and be sure the key/match field on the back-end (the portal records file) is indexed; you can't have a relationship between 2 globals or two unindexed fields.
What i did was create a script in the referenced file with a relogin command that sets the username/password identical to the IWP file. This script is called on file open.
I am still gettting a blank portal until I go back to the home page (IWP_home), login to the referenced file with a username password and only then does it show me the refernced data.
My question is did my relogin script not work on the IWP but just on the local client?
I have ruled out everything else because once I login in to the referenced file through the IWP home page everything works.
I really need to get this going so I really appreciate your help !
- Please post your login script -- let's see if there is a problem with it.
Keep in mind that a relogin may be leaving the related table logged in with a different account or an invlaid account for the related file depending on where and when its opening was triggered.
Is there some reason you are not using the standard FileMaker credentials for a regular login instead of using a scripted relogin?
The relogin script is just one script step [ relogin Account:"admin"] and no password (there is no password for admin in the database).
I would manually login but this solution is for a client and I dont want them to go to the related DB, just see the data in a portal. plus its a pain to open a second database when there is no need.
I feel like I'm missing something and its very small like maybe I need to relogin in the IWP Database with admin or something like that.
thanks for your generous help sir.
I think I recall that the 'Re-Login' script step is not available with IWP - which would be your problem!
You may have to put all the IWP account details into your second file as well.
Best wishes - Alan Stirling, London, UK.
+44 (0) 20 7724 2456 - email@example.com - www.ast.fm
FileMaker Pro Developer - Certified for FM versions: 7 to 11.
In an attempt for some closure here's what happenend. I had the order of the accounts wrong in the referenced file. In order for Fm to "see" a referenced file in IWP, both Databases need to be enabled and the accounts need to be lined up. So if you have Username:Admin ; Password:123 and in the other file the same account, to ensure there is no issue put them both on top in the dialogue box. that soved my issue with referenced files in IWP.
A word to the wise (not from me , but from my friend Rick Aguirre) when creating a DB in IWP, start from scratch. If starting form a template like I did, get rid of all unecessary accounts, scripts, layout objects etc. as these will undoubtedly cause problems and then you have to spend time trouble shooting and pulling your hair out. keep your hair, start from scratch.