Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Possible bug with Web Viewer and unstored calc. fields...???

Featured Replies

I'm working with a series of pages inside a web viewer. On the final page I display a subscription ID that is returned by PayPal's system. I need to get this ID value into a field in FM.

GetLayoutObjectAttribute("SubscriptionBrowser" ; "content") gives me the source code of the currently viewed page in the Web Viewer.

Similarly, GetLayoutObjectAttribute("SubscriptionBrowser" ; "source") will give me the current URL of the web viewer.

However, if I add these values into unstored calc. fields they do not update until I click into that field on a layout.

Data Viewer will show the calculations correctly at all times. I can also run a Refresh Window script step and the fields will update. If I'm simply browsing different pages and watching the fields on the layout, though, they don't change unless I click into them.

Anybody else run into this? It's a small thing that's really a big problem for me at the moment. I'm trying to parse data from the web viewer's HTML and it works great in DataViewer but the calc. fields don't update until I click into them, which doesn't really work for me. unstores calc. fields are just suppose to update aren't they? Just like they do inside data viewer..??

I've got a little test file setup if anybody cares to look at it, let me know.

It's not really a bug - it's just that Filemaker doesn't see a reason to refresh the screen as a result of your browsing. Why is this a problem for you? You should GET the correct result (as opposed to SEEING it), any time you refer to the unstored calculation field.

  • Author

Well, it's not ever taking that value. The field won't ever take the change unless you activate the field or refresh the window. If neither of those things occur before you leave the layout or change the WebViewer URL it isn't using it.

Is there a way I can call a script without pushing a button? Maybe based on the URL in the WebViewer or something like that, or any other way? The value seems to update fine if I were to load it into a variable and then Set Field with those values within the script, but I can't rely on the user clicking a button.

It's not "taking that value", because an unstored calculation field does not have a value - only a formula. This formula is used when the screen is rendered. The value you see exists only in the screen buffer.

Why is this a problem for you?

  • Author

What I need is for the value that is parsed out of the HTML to be placed into a FM field. The problem is I can't rely on the user clicking a button to activate a script.

I was hoping to use an unstored calc. in combination with a stored calc. The unstored calc. would get set to the value only when the WebViewer had that value. Any other time it wouldn't calculate and would show a ? or be nothing.

I was thinking I might be able to then make the stored calc. based on the unstored one and take its value if the length of the unstored value was > 0 or something like that. Then I'd have the value I need in a stored calc. and it wouldn't ever change unless that URL was hit again in the WebViewer, which would be fine.

However, since the unstored calc. won't update itself it's not working out for me.

No, it cannot work that way. A stored field will not react to "changes" in an unstored field - because the unstored field does NOT change.

It's the same as having an unstored field = Get (CurrentTime). It doesn't show a live ticking clock, and you cannot have a stored field update itself every second.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.