Jump to content
Server Maintenance This Week. ×

How to use Get(LayoutName) in a Calculation Field?


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

Recommended Posts

Get( layoutName ) is fine.

No alternative required.

But as with all questions here, it is important to give a much more complete description of what you are doing and why.

Link to comment
Share on other sites

 

 

Is there a way to use Get(LayoutName) in a Calculation Field? 

 

It's a really bad idea, no matter what you have in mind.  Don't bury business logic at the field definition level.  If you need something evaluated based on where the user is (layout), do it i a script.

Link to comment
Share on other sites

Hi,

 

This is not my work, but it seems that there are two fields that were made specifically for conditional formatting. So these two fields are based on an original field which is all raw text data.

 

So the problem for me now is that one of these two formated fields are now used in another layout. So the format field has to be readjusted again for the layout.

 

But like I said, I tried Get(LayoutName) in the Calculation Field and it does not work. It returns a null value.

Link to comment
Share on other sites

Get(LayoutName) in the Calculation Field and it does not work. It returns a null value.

 

Make sure the calculation's result type is set to Text and that the calculation field is unstored.

 

 

So the problem for me now is that one of these two formated fields are now used in another layout. So the format field has to be readjusted again for the layout.

 

No idea what you mean by that.

Link to comment
Share on other sites

That just isn't true. You're leaving out a lot of detail. Can you supply a clone of the file or PDF of the field definitions or a DDR?

Link to comment
Share on other sites

Johndoe: it is not true that the function get( layoutName ) does not work.

 

The function works fine and has no bugs.

 

There may be problems with HOW you are using it.

 

As mentioned by Wim, there are significant questions about whether you should be using it as part of a field definition.

 

If used within a field calc, it must be (as Comment mentions) text result; unstored.

 

But your statements are still quite vague, so it will be helpful to supply a lot more detail.

You mention something about conditional formatting but again - we cannot yet see how that applies.

Link to comment
Share on other sites

Oh, the calculation is just Get(LayoutName), there's nothing else in it.

I wanted to make sure it returned a value before I actually used it.

 

And the problem was because I was storing it, so I checked the Do not store and it works now. Thank you.

Link to comment
Share on other sites

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