Question
Pegasystems Inc.
IN
Last activity: 6 Sep 2017 7:35 EDT
getting error while using pxConvertStringToPage function
While using pxConvertStringToPage function,I'm gettng below error message ' Unable to perform ConvertStringToPage, due to invalid inputs. What might be causing this?
***Edited by Moderator Marissa to update categories***
-
Likes (1)
Atanu Bandyopadhyay -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
PL
Try add step Page-New targetPage before step with with pxConvertStringToPage . I've got similar issue on 7.3.1:
My datatype was O1T7RB-B73b-Data-Test with following fields:
- A: Text
- B: Text
- C: TrueFalse
- D: TrueFalse
- E: ValueList (Text)
Defined sample Activity which takes json as input param Param.testjson
It had just 2 steps:
step1: @(Pega-RULES:Page).pxConvertStringToPage(tools, Test, Param.testjson, "json")
step2: use values from Test page..
where Test=O1T7RB-B73b-Data-Test
Then on section I defined button to run my activity with testjson = {"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}
Observations:
- fields A, C, D and E were set correctly, so bool values works both with and without quotation marks
- field "B" was not set, because in testjson it is with lowercase.
Then I modified O1T7RB-B73b-Data-Test by adding Text and FieldGroup properties and then remove both of them.
Try add step Page-New targetPage before step with with pxConvertStringToPage . I've got similar issue on 7.3.1:
My datatype was O1T7RB-B73b-Data-Test with following fields:
- A: Text
- B: Text
- C: TrueFalse
- D: TrueFalse
- E: ValueList (Text)
Defined sample Activity which takes json as input param Param.testjson
It had just 2 steps:
step1: @(Pega-RULES:Page).pxConvertStringToPage(tools, Test, Param.testjson, "json")
step2: use values from Test page..
where Test=O1T7RB-B73b-Data-Test
Then on section I defined button to run my activity with testjson = {"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}
Observations:
- fields A, C, D and E were set correctly, so bool values works both with and without quotation marks
- field "B" was not set, because in testjson it is with lowercase.
Then I modified O1T7RB-B73b-Data-Test by adding Text and FieldGroup properties and then remove both of them.
After that pxConvertStringToPage stopped working and in text file exported from Tracer I saw:
<pagedata>
<pzActivityParams>testjson=%7B%22A%22%3A%22aa%22%2C+%22b%22%3A%22bb%22%2C+%22C%22%3A%22true%22%2C++%22D%22%3Atrue%2C+%22E%22%3A%5B%22e1%22%2C%22e2%22%5D%7D</pzActivityParams>
<pzHarnessID>HID7633ADCD115BC2EF773F2C96A9C69B9C</pzHarnessID>
<pzPrimaryPageName>pyWorkPage</pzPrimaryPageName>
<pzTransactionId>d5309c160ff1fc5c1991fb990308a9a4</pzTransactionId>
<errorMessage>Unable to perform ConvertStringToPage, due to invalid inputs.</errorMessage>
<UITemplatingStatus>N</UITemplatingStatus>
<AJAXTrackID>1</AJAXTrackID>
<testjson>{"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}</testjson>
<pzFromFrame>pyWorkPage</pzFromFrame>
<ClientInt>Start</ClientInt>
<pyActivity>pzRunActionWrapper</pyActivity>
<inStandardsMode>true</inStandardsMode>
<pzActionID/>
<pzActivity>xyTestActivity</pzActivity>
</pagedata>
I fixed it by adding step Page-New: Test before pxConvertStringToPage step. No there is no error and Test is filled as expected:
<pagedata>
<pzActivityParams>testjson=%7B%22A%22%3A%22aa%22%2C+%22b%22%3A%22bb%22%2C+%22C%22%3A%22true%22%2C++%22D%22%3Atrue%2C+%22E%22%3A%5B%22e1%22%2C%22e2%22%5D%7D</pzActivityParams>
<pzHarnessID>HIDCEF88324F1E68E710CC40BBA0157A1DF</pzHarnessID>
<pzPrimaryPageName>pyWorkPage</pzPrimaryPageName>
<testjson>{"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}</testjson>
<pzFromFrame>pyWorkPage</pzFromFrame>
<ClientInt>Start</ClientInt>
<pzTransactionId>b8ad38b9ac515d4dbf91a5f3145c707e</pzTransactionId>
<inStandardsMode>true</inStandardsMode>
<UITemplatingStatus>N</UITemplatingStatus>
<pzActionID/>
<AJAXTrackID>1</AJAXTrackID>
<pzActivity>xyTestActivity</pzActivity>
</pagedata>
Pegasystems Inc.
US
HI,
What is the input data you provided for the function, "pxConvertStringToPage"?
Based on the function usage (below), it accepts a string in a specified format (xml or json).
This function adopts input data as a string in a specified format (xml or json) onto the target clipboard page and returns a status indicating success or failure as a Boolean.<br><br>
Parameters: <br>
targetPage: Target clipboard page to map the input data to<br>
data: Input data as a String<br>
format: An optional format of input data, valid values are xml and json, default is json<br><br>
Return:<br>
true or false indicating success or failure of the operation<br>
In case of error, 'errorMessage' param is set with an appropriate error message<br>
So, please double check the function input.
example:
@(Pega-RULES:Page).pxConvertStringToPage (tools, myStepPage, Param.jsonstring,"json")
Thanks,
Susan
-
Chandi Priya Pulluri
Accepted Solution
Pegasystems Inc.
PL
Try add step Page-New targetPage before step with with pxConvertStringToPage . I've got similar issue on 7.3.1:
My datatype was O1T7RB-B73b-Data-Test with following fields:
- A: Text
- B: Text
- C: TrueFalse
- D: TrueFalse
- E: ValueList (Text)
Defined sample Activity which takes json as input param Param.testjson
It had just 2 steps:
step1: @(Pega-RULES:Page).pxConvertStringToPage(tools, Test, Param.testjson, "json")
step2: use values from Test page..
where Test=O1T7RB-B73b-Data-Test
Then on section I defined button to run my activity with testjson = {"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}
Observations:
- fields A, C, D and E were set correctly, so bool values works both with and without quotation marks
- field "B" was not set, because in testjson it is with lowercase.
Then I modified O1T7RB-B73b-Data-Test by adding Text and FieldGroup properties and then remove both of them.
Try add step Page-New targetPage before step with with pxConvertStringToPage . I've got similar issue on 7.3.1:
My datatype was O1T7RB-B73b-Data-Test with following fields:
- A: Text
- B: Text
- C: TrueFalse
- D: TrueFalse
- E: ValueList (Text)
Defined sample Activity which takes json as input param Param.testjson
It had just 2 steps:
step1: @(Pega-RULES:Page).pxConvertStringToPage(tools, Test, Param.testjson, "json")
step2: use values from Test page..
where Test=O1T7RB-B73b-Data-Test
Then on section I defined button to run my activity with testjson = {"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}
Observations:
- fields A, C, D and E were set correctly, so bool values works both with and without quotation marks
- field "B" was not set, because in testjson it is with lowercase.
Then I modified O1T7RB-B73b-Data-Test by adding Text and FieldGroup properties and then remove both of them.
After that pxConvertStringToPage stopped working and in text file exported from Tracer I saw:
<pagedata>
<pzActivityParams>testjson=%7B%22A%22%3A%22aa%22%2C+%22b%22%3A%22bb%22%2C+%22C%22%3A%22true%22%2C++%22D%22%3Atrue%2C+%22E%22%3A%5B%22e1%22%2C%22e2%22%5D%7D</pzActivityParams>
<pzHarnessID>HID7633ADCD115BC2EF773F2C96A9C69B9C</pzHarnessID>
<pzPrimaryPageName>pyWorkPage</pzPrimaryPageName>
<pzTransactionId>d5309c160ff1fc5c1991fb990308a9a4</pzTransactionId>
<errorMessage>Unable to perform ConvertStringToPage, due to invalid inputs.</errorMessage>
<UITemplatingStatus>N</UITemplatingStatus>
<AJAXTrackID>1</AJAXTrackID>
<testjson>{"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}</testjson>
<pzFromFrame>pyWorkPage</pzFromFrame>
<ClientInt>Start</ClientInt>
<pyActivity>pzRunActionWrapper</pyActivity>
<inStandardsMode>true</inStandardsMode>
<pzActionID/>
<pzActivity>xyTestActivity</pzActivity>
</pagedata>
I fixed it by adding step Page-New: Test before pxConvertStringToPage step. No there is no error and Test is filled as expected:
<pagedata>
<pzActivityParams>testjson=%7B%22A%22%3A%22aa%22%2C+%22b%22%3A%22bb%22%2C+%22C%22%3A%22true%22%2C++%22D%22%3Atrue%2C+%22E%22%3A%5B%22e1%22%2C%22e2%22%5D%7D</pzActivityParams>
<pzHarnessID>HIDCEF88324F1E68E710CC40BBA0157A1DF</pzHarnessID>
<pzPrimaryPageName>pyWorkPage</pzPrimaryPageName>
<testjson>{"A":"aa", "b":"bb", "C":"true", "D":true, "E":["e1","e2"]}</testjson>
<pzFromFrame>pyWorkPage</pzFromFrame>
<ClientInt>Start</ClientInt>
<pzTransactionId>b8ad38b9ac515d4dbf91a5f3145c707e</pzTransactionId>
<inStandardsMode>true</inStandardsMode>
<UITemplatingStatus>N</UITemplatingStatus>
<pzActionID/>
<AJAXTrackID>1</AJAXTrackID>
<pzActivity>xyTestActivity</pzActivity>
</pagedata>
-
Atanu Bandyopadhyay
Pegasystems Inc.
IN
It works only if the page is there in the clipboard. Thanks Surdm
-
Goutham Reddy Gattu