Jump to content
Sign in to follow this  
Ocean West

Constant

Recommended Posts

It has been called by other things but this is the most considered term.

A constant is a stored calculation field. Result is "1".

This field can be used by a relationship where the constant

from File A = the constant in File B by this approach you can pass

data to global fields in File B.

I have addopted the standard that each file I create gets a field

which I call...

iOne.

Share this post


Link to post
Share on other sites

i always use Constant as well. I call it Constant1 or maybe Constant0 if I need that - i find it's great for use in portals and other relationships off any calc that would return a 1 or 0.

But one thing I've started to do is to not use a Calculation and instead make it an indexed number field that auto-enters "1". Since I make it non-modifieable and don't even display it anywhere it's secure, and it seems to me it's just one less calculation FM has to make.

Thoughts on this? Is using actual numerical data faster that using a calculation field?

Thanks,

Jodin

sample.fp7.zip

Share this post


Link to post
Share on other sites

An interesting point! I don’t think the calc or auto enter really makes so much difference here, as the calc result is stored and never recalculated. However, the advantage of the auto enter system is that you can change the values in the fields if you want to. This is very useful for omitting entries in a portal. For example – I use a constant of 1 to link two files, and then view the records in file 1 in a portal placed in file 2, or even in a self-relationship. I then have a script attached to a button in the portal, which sets the link value in file 1 to 0 – thus the related record disappears from the portal – with another script I can cause the omitted records to reapear or switch to those records in the portal – I find this very useful.

Rigsby

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  

  • Who Viewed the Topic

    1 member has viewed this topic:
    comment 
×
×
  • Create New...

Important Information

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