Skip 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.

update file1.fieldA when file2.fiieldB changes

Featured Replies

Hi,

Would like some advice on the following problem we are having, which I'm sure is just a matter of overlooking something.

We have a file1, which lists items, their size and a price for this item calculated from size times the price/unit at that size range

once a week we receive a file which provides us with the different size ranges and the price per unit at each of the size ranges.

we have set up a relationship whereby the price/unit field of a product in the first table can be retrieved from a matching unit-price-at-size-range record in the reference table, HOWEVER

(this is where the problem lies)

when the reference table is flushed each week, we need the actual prices in the product table to change - the value is calculated OK for a new item added, but we need some way that all 10000 or so items would be updated with new information, essentially live, or at least on command...

any thoughts?

thanks in advance

Is your calc field set to unstored? (Under Storage Options in the calc definition.)

Jerry

  • Author

hmmm the field type is "number"...which does not seem to have the option for unstored... if i try to make it a "calculation" type field, it won't let me on grounds that another field is using it...

  • Author

perhaps this bears clarification...

i am linking these 2 tables on a hybrid calculated field which links the type of items and the size range into one entity...

then using that index, the price-per-unit-at-range is a "looked up" number - thus, a number, not a calculation as such.

Why is your Price-per-unit-at-range NOT a calc field? It's always equal to size times price, right? So your calc field should just be the product of two related fields, ReferenceTable::Size * ReferenceTable::Price. Right?

J

  • Author

the price-per-unit-at-range is a set field and it varies depending on the range (diamonds).

the ref table entries look like this: (simplified and unreal data)

MIN MAX PRICE/C

0.01 0.03 100

0.04 0.07 105

0.08 0.14 130

0.15 0.17 135

etc

there is no calculation that will get me these values, and this is the information we are getting from an outside source.

the range goal-posts are, thankfully, set, and never overlap.

the combined index (from the side of the product table) is determined like this:

Case(

Weight>=.01 and Weight <= .03, ".01-.03",

Weight>=.04 and Weight <= .07, ".04-.07",

Weight>=.08 and Weight <= .14, ".08-.14",

(etc)

)

in the incoming reference table, i just combine the goalpost values to form the same information.

i have a relationship between the tables defined as indexed on this combined field.

then, when a new product weight is entered, that case statement is triggered and an appropriat value put into the "range field" for that product - then the price/u@r can be determined (lookup) from the incoming ref table...

i hope that makes sense...

  • Author

bump. anything?

Could this be done with a lookup? If no exact match, use next higher (or lower). A Relookup would then update the prices.

  • Author

how would i do a relookup in a few thousand records?

A relookup can be done by putting the cursor in the key field (of the lookup's relationship) and selecting Relookup from the Records menu (this can also be scripted.)

  • Author

ahhhh yess thankyouthankyouthankyou.

i didn't even know "relookup" existed, but i looked around, found some instructions, and this is indeed the way the cookie crumbles.

just for the record, when the range prices table changes, i select the combined index column (the key we're using to join the 2 tables) in the main pricelist, and do records>relookup. (this despite the fact that the actual looked up column is price/unit...)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.