- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Our company uses the following sheet naming convention:
Dxx detailSheetName
where Dxx is a detail number from D1 to D99.
The intent of the below Diesel expression is to pull the Detail number from the Layout tab name for either a single digit or double digit following the D and update the field inside the attribute.
Running the below code on Layout tab "P2 WALKWAY PAD LAYOUT" displays the desired "P2", but with a leading space " P2".
Running the below code on Layout tab "P10 ERRC CONDUIT PENETRATION" displays the desired "P10", but with a leading space " P10".
$(if, $(eq, $(substr, $(getvar, ctab),4,1), " "), $(substr, $(getvar, ctab),2,2), $(substr, $(getvar, ctab),2,3))
Apparently there is an invisible/escape character in the string, as I would expect the below numbers would have produced the desired results:
$(if, $(eq, $(substr, $(getvar, ctab),3,1), " "), $(substr, $(getvar, ctab),1,2), $(substr, $(getvar, ctab),1,3))
Any suggestions on how to eliminate the leading blank space character, or at least know where it is coming from? I came up with the syntax after looking at several Diesel examples in the forums.
Thank you.
Solved! Go to Solution.