Jump to content
Sign in to follow this  
Leb i Sol

Lookup vs. Auto-Enter Caluclation

Recommended Posts

Hello People!

I was just wondering if anyone would like to comment/share their experience and knowledge on Lookup fields vs. AutoEnter Calculations (of the same field in question).

Which is better or more stable way to go about pulling the associated data?

Thank you!

Share this post


Link to post
Share on other sites

the main difference is

lookups change whenever the lookup key changes

auto-enter-calcs change only if field is empty

both have their uses, depending on your task.

Share this post


Link to post
Share on other sites

Christian said it in a nutshell. I'll add that with a lookup, you can also do some interesting things with the "use next higher" options, e.g., for quantity discounts. Using a calc, on the other hand, you can do more elaborate things like:

If(Key::Special = "Yes", SpecialPrice, Price).

Share this post


Link to post
Share on other sites

"auto-enter-calcs change only if field is empty"

can you elaborate please....how can they change if I leave the associated field empty?

eg.

Select Some_ID:

[some_ID][lookup associated field with this ID]

vs.

[some_ID][auto-calcualtion that = associated field with this ID]

thanx Chris!

Share this post


Link to post
Share on other sites

If say, the price field is based on some_ID, if price is a lookup, it will change when some_ID changes. If price is an auto-calc, it won't change unless you clear it out before you change some_ID.

Share this post


Link to post
Share on other sites

Thanx Fitch!

This statement cleared it a bit more:

"Using a calc, on the other hand, you can do more elaborate things like:

If(Key::Special = "Yes", SpecialPrice, Price)."

It is hard to "imagine" what you could do without trying to do it laugh.gif

Thank you guys!

Share this post


Link to post
Share on other sites

Hi,

"If say, the price field is based on some_ID, if price is a lookup, it will change when some_ID changes. "

Changing the ID would lead to trigger a Re-lookup, that could also be set by a script.

Unless you used a calculation for the lookup.

c_locklookup = Case(not isEmpty(Invoice_Number), Product_ID& " 0", Product_ID).

This way, whatever Re-lookup script you're launching, the price won't change if the Invoice N

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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