Posted: 20 Feb 2020 10:53 EST Last activity: 27 Feb 2020 15:05 EST
How to resolve a pyCommitError: Cannot write property to a decimal column
I am currently working on the Systems Architect Essentials Solution Build. Upon reaching US 110, I realized that I made the License Number property into an Integer field type instead of a Text field type.
I deleted the License Number integer type and made a License Number text (single) field type instead and added it to the Collect Customer Information section.
Once I get to the Verify Customer Information step, the following occurs (images attached as well):
Scenario 1: I enter all numbers in the License Number field (i.e. 12345) and I am able to Submit the form. It routes for Approval to the Verify Customer Information step and I am able to approve and move onto the next step.
Scenario 2: I enter both text and numbers in the License Number field (i.e. T12344) and I am able to submit the form. It routes for Approval to the Verify Customer Information step and once I click Approve, I receive the following error message:
Cannot write property LicenseNumber to a decimal column--its value, "T12344", is not a decimal: code: <none> SQLState: <none> Message: <none>
I have verified that the Field is of Text(Single) property type.
Does anyone have any suggestions on what I need to do to debug this issue?
***Edited by Moderator Marissa to update platform capability tags****
Yes, I am using the same License Number field of text field type in the Verify New Customer step. When configuring the Verify New Customer step view, I used the existing Customer field group and Collect Customer Information view as read-only.
Here are the following screenshots:
License Number field with only numbers - passes the acceptance criteria and I am able to approve without errors
License Number field with a character and numbers - doesn't pass the acceptance criteria and give me an Error Message when I try to approve
Verify New Customer view with License Number Field as Text Input
This case might occur if you have exposed your 'LicenceNumber' when it was integer property in declare index or in work class. As you have changed the property type, you also need to update the type in DB table as well. use DB script to drop 'LicenceNumber' and expose the same property of type text.
I am not familiar with DB script and I have tried to search how to execute a DB script with no luck. Do you have any other suggestions on how to update the data type in the database? I am new to Pega and I am slowly getting familiar with the platform.
It seems that you are removing the property from the case type configure view which is associated with an assignment. Even if you have removed it, the property won't get deleted. In the background, Pega creates a property rule with the name that you have mentioned in the configure view. Please delete the property rule from the respective class rule and check the use-case again.
I have deleted all LicenseNumber property rules of integer type from Record>Dat Model>Property tab leaving only the LicenseNumber property of text type rule (highlighted in the image below). Although, I am still receiving the same pyCommitError. Do you have any other suggestions on where I should be looking to delete this property rule?