johndoe Posted June 5, 2014 Posted June 5, 2014 Hello, Is there a way to use Get(LayoutName) in a Calculation Field? Cause when I tried it, I get a null value. Is there any other alternatives? Thank you!
bruceR Posted June 5, 2014 Posted June 5, 2014 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.
Lee Smith Posted June 6, 2014 Posted June 6, 2014 Read the help here Be sure you are writing it as the Example shows? Automatic messageThis topic has been moved from "Layouts" to "Calculation Engine (Define Fields)".
Wim Decorte Posted June 6, 2014 Posted June 6, 2014 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.
johndoe Posted June 6, 2014 Author Posted June 6, 2014 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.
comment Posted June 6, 2014 Posted June 6, 2014 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.
bruceR Posted June 6, 2014 Posted June 6, 2014 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?
comment Posted June 6, 2014 Posted June 6, 2014 That just isn't true. Please be more specific - especially if you must be rude.
bruceR Posted June 6, 2014 Posted June 6, 2014 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.
johndoe Posted June 6, 2014 Author Posted June 6, 2014 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.
Lee Smith Posted June 6, 2014 Posted June 6, 2014 Is there any other alternatives? Layout Mode >> Insert >> Other Symbol... >> LayoutName
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now