Question
Veteran Careers First
US
Last activity: 7 Mar 2018 13:04 EST
Expression Builder/Function in activity
MyPage.MyPage.Myvaluelist(21)
Myvaluelist(21) = ABC123
I am attempting to parse ABC123 so that only the number 123 is passed to PEGA using the Expression Builder in activity.
I tired substring but cannot seem to get it right.
MyPage.MyPage.MyValuelist(21) = Substring(ABC123,Int StartIndex=0, Int endIndex=5)
I get error saying:
-Invalid expression or reference: Operation "==" is not permitted on types: includedpage and integer
See Attachment
-
Likes (2)
Keerthana MD Mugesh D -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi,
Can you try the following?
MyPage.MyPage.MyValuelist(21) = @(Pega-RULES:String).substring(ABC123, 0, 5)
Thanks,
Susan
-
Tom Zhang Vinay Hadule Naresh Manimaran Chunzhi Hong Vishwa Teja
Veteran Careers First
US
I will give this a try.
Veteran Careers First
US
This record has 1 error(s) in 1 place(s) .
Source—
Invalid expression or reference: error Final Expression
(truefalse) can't be converted into the desired type (decimal)
Pegasystems Inc.
CA
Try as Susan suggested. On a different note, if you want to extract 123 from ABC123, your start and end index arguments to substring function are incorrect.
Veteran Careers First
US
How can I make it correct....
EPAM Systems, Inc.
ES
Hi @HenryA80,
Thanks for posting on PSC.
You can go with the split function if you know the string structure and place of occurrence of numerals.
Alternatively, you can your own function with below code and use it in Expression Builder.
Veteran Careers First
US
Thanks I will give this a try...