Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Below is the code I am using in the dimension field for displaying the something like A1-09, where A1 is the month and 09 is the year as per our understanding. I don't want the below code to be executed if FINISHPERIOD and FINISH_YEAR are blank. Please let me know how to do this.
=FINISHPERIOD&'-'&right(FINISH_YEAR,2)
See the below image, I think I am getting - (because of this &'-'& in the above code)when both the fields are blank.
Hi
This should do the trick:
=If(Len(FINISHPERIOD) > 0 And Len(FINISH_YEAR) > 0, FINISHPERIOD & '-' & right(FINISH_YEAR, 2))
Jonathan
Jonathan Dienst wrote:
This should do the trick:
=If(Len(FINISHPERIOD) > 0 And Len(FINISH_YEAR) > 0, FINISHPERIOD & '-' & right(FINISH_YEAR, 2))<div></div>
Just now I did exactly the same thing and seeing your code after that. Many thanks for your support.
Cheers
Attitude wrote:
<pre>
Jonathan Dienst wrote:
This should do the trick:
=If(Len(FINISHPERIOD) > 0 And Len(FINISH_YEAR) > 0, FINISHPERIOD & '-' & right(FINISH_YEAR, 2))<div></div>
Just now I did exactly the same thing and seeing your code after that. Many thanks for your support.
Cheers
Hi
To be on the safe side, you might also use trim:
len
(trim(FINISHPERIOD))>0
Rgds
Jonas
Consultant @ Optivasys | http://www.optivasys.se
Thanks Jonas!
You are right too...