AnsweredAssumed Answered

StringBuilder, redirection and other functions

Question asked by ian.d.gore on Apr 5, 2017
Latest reply on Apr 11, 2017 by tswift

I'm trying to use StringBuilder to access an attribute in another element - but in a more configurable way.   However I'm having problems with the way it does indirection.


If I code the complete path into StringBuilder settings then I get the value

eg ..\..\..\Products\PROD1\|ProductPrice will return the value in ProductPrice


If I use substitution (eg use the Element name) then it also works

eg ..\..\..\Products\%Element%\|ProductPrice


However, if I try to use the content of another attribute to make up the path or use a function like replace then it just returns the string and doesn't do the redirection

eg ..\..\..\Products\'ProdIDAttribute'\|ProductPrice just returns ..\..\..\Products\PROD1\|ProductPrice (if ProdIDAttribute contains PROD1)


Is there any way I can achieve what I want to do either using StringBuilder or Analytics?  I could do something like this using PIPoint using the syntax below (which doesn't work with StringBuilder) - but I don't want the referenced attribute to be a tag.



On a related note - what is the status of the work item mentioned in the following thread

String Builder function "Replace" second argument cannot be a function


Also - can we have a "Find" function that returns a position that can be fed into Left, Right, Mid, etc.