
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi I am working with If statement to automate my "next sheet" number for my template. I used this formula and was expecting this ,
LAYOUT TAB NAME: 007-END
$(if,$(substr,$(getvar,"CTAB"),5,1)"0" --->if 5th character = non-zero
,$(substr,$(getvar,"CTAB"),5,3) ---> If true (a non-zero which is E), it will return 5th to 7th character which is END
,$(if,$(substr,$(getvar,"CTAB"),6,1)"0" --> If it's false then it will look if 6th character = non-zero
,$(substr,$(getvar,"CTAB"),6,2) ---> If true (a non-zero), it will return the 6th and 7th character
,$(substr,$(getvar,"CTAB"),7,1))) ---> If false then it will return the 7th character only
It's a 7 character-length string. The formula works with other layout tab like 001-002, 002-003, ...... returning 2 and 3 respectively and 003-04A, 04A-04B..... returning 4A and 4B.
However for 007-END it returns an error $(IF,??).
I tried to change the layout name to 007-4ND it returns 4ND.
This means the formula is okay for any non-zero character (numbers 1-9) except for letters like in this case is letter E.
Solved! Go to Solution.