Jump to content

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


angelleye

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

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5886 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.