Substring for Dynamic Text

560
2
10-14-2011 10:32 AM
Status: Open
ChristopherStorer1
New Contributor II
When assigning a complex string to various layout tags, it would be nice to be able to split the string out.  Example: map A01-12-32; if I want to place "A01", "12", and "32" in various parts of the page layout, I need to create three additional fields and substring the data into those three fields.  If I could do something like this: <dyn type="page" property="name" substr="3"/>  it would make the whole process much more clean.
2 Comments
BruceLang
I agree, string formatting should be improved.  The capability to format a string like the Picture function in Crystal Reports.  Two examples:

String,  Picture,  Result
"1234567890",  ”(xxx) xxx-xxxx”,  "(123) 456-7890"
"1928100002",  "xx-xx-xxx-xxx",  "19-28-100-002"

Which is much easier than this:
strPIN = [gis.GIS.ParcelPoly.PIN]
left(strPIN,2) & "-" & mid(
strPIN,3,2) & "-" & mid(strPIN,5,3) & "-" & right(strPIN,3)

See http://crystaltricks.com/wordpress/?p=146
BerendVeldkamp
See here for a more general idea.