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.

Featured Replies

Here's my problem, hopefully someone out there has some insight.

I have 3 tables, one called Paginator, one called Gaps, and one called Ads. Each entry in ads has a measurement, and I'm trying to fit a number of those ads into a Gap, which has a larger measurement. Basically, the script I'm using looks at the space left in each Gap and finds the best Ad to fill that space.

So here's my problem. I'm trying to test the length of an ad against the space left in a gap, to see if the ad is a candidate for insertion. The problem is, that when I've already inserted two other ads, the length stops updating, to reflect the space filled by the ads it already holds. The calc goes like this

Length = Bottom - Top - Sum(AdsInThisGap::Inches)

where bottom - top returns the actual size of the hole to fill, and the sum adds up all the ads that are already placed in the gap. But like I said, I'll add the first ad, and the length function updates. When I add the second, it doesn't, and so the third ad thinks that the second didn't take up any space. Does that make sense?

The calculation is unstored, of course, and its being called inside of the Paginator table, by an if function over a relationship that I've verified is hooking to the right Gap.

Any ideas? Do sum functions not work over a relationship? The only thing I can see possibly being an issue is that the sum part of the function is basically being grandfathered into Paginator (paginator asks gaps for length, which asks ads for sum of inches). Can I not do that? How else can I get a sum grandfathered like that?

Refresh problems are hard enough to solve when you get to see the files. If you are running a script, I wouldn't think there should be refresh problem. If your script is at all dependent upon a layout for correct operation, you may have to refresh the layout. I would probably lose the calculation field and perform the calculation with a Set Field to update the length in the script.

-bd

Try putting in a Pause with a '0,0,0' time and see if it helps. If it is timing, this may correct it.

  • Author

Well, I tried just doing a set field instead of a calculation, but it was just so complex that I knew it would be ripe for bugginess later (there's a lot of alteration to that number!). So instead, I just set up a calculation parallel to the real calculation, in the database that the script is running in. This synced it up fine. Now, is there any good resources out there, for reading up on refresh and synchronisation and all this? Thanks so much for all your help! smile.gif I just figure I'll see if I can find a good body of knowledge to study, now, so this won't happen again.

  • Newbies

Try using the 'Go to Field' option in your script send it to the field you wish to recalculate, (the Length field you mention).

Usually on unstored calculations this forces it to recalculate.

Often, putting in an "Exit Record" step will help too.

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.