Question
PKUtech Co., Ltd
JP
Last activity: 14 Jun 2021 7:38 EDT
Comparing Strings in two local storages
Hi, all
I am required to compare two string data ... one in local storage and the other in another local storage...
How do I compare the data? Any advice, please..
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
IQZ Systems
IN
Hi
If you want a validation kind of thing, you can use a validate rule in the flow action and use one of the following functions as shown below.
You can also compare stings in a Data transform and set a property value with @compareStrings(.value1,.value2);
Hope this helps
Pegasystems Inc.
IN
Hi,
Please check the below link if it helps :
https://collaborate.pega.com/question/need-compare-two-string-values
Thanks
PKUtech Co., Ltd
JP
Thank you, Yathender and Parav1.
Is there any way to use Data page? Because I am required to each records in different local storages...
e.g.) to compare propertyA and A' in two different local storage
A local storage
--- propertyA
B local storage
-----propertyA'
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
Do you want to compare the property from one list with other list?
For example: For each local data source, we have the Data pages which get the list of results from the local storage.
say D_List1 and D_List2 have results and D_List1.pxResults(3).value="abc", do you want to check in D_List2.pxResults has the same value?
PKUtech Co., Ltd
JP
Yes, that I want to do.
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
You can use "IsInPageList" OOTB function to check if D_List1.pxResults(3).value is present in D_List2.pxResults.
IQZ Systems
IN
Hi
you can use OOTB activity pxCompareTwoPageLists which takes to Page Lists and corresponding properties to compare. You will have default data pages of type list Ex: D_AList if you have created A as a DataType.You can give this pages like D_AList.pxResults as parameters to the activity.
Something like this
PKUtech Co., Ltd
JP
Dear Yathender
Thank you for your explanation.
I am required to compare one property in a Data page for loop.
Is it possible to use loop in the activity?
e.g.)
propertyA look for the propertyB1, B2, B3......Bn in the different data page...
Updated: 14 Jun 2021 7:38 EDT
Pegasystems Inc.
IN
Yes, it's possible to loop in an activity, you can use "For each embedded page" and use DataPage.pxResults as a step page to loop through data page results.