need to apply date format and when conditions on bix rule
I am facing couple of below issues while fetcing data into CSV file by using BIX Extract rule in pega 7.1.x
1. when I am trying to export the data into CSV file, I need to change Date format from the Pega Datetime format to other system formats(Ex : should change to BIGdata readable format).
2. And also we need to have when conditions like (before exporting data into CSV we need to check whether that property has value or not , if that property does not have value should map some other property in other pageList.)
3 . We need to restrict the Decimal points to 2 or 3 digits.
1. In general you may change the format of a property by using the edit input rule and reference this in the property-in advance tab. There are a number of out of the box edit input rules that you may use as examples Date, DateTime, and DateTime-Calendar.
2. A way of doing this is by using the Data Transform rule When or Otherwise When actions to peform conditional data manipulation.
3. You may use the Decimal HTML property/control or formatdecimal control to limit the decimals.
I hope the above ideas help you, generally these types of design questions may be of significant scope that may require a more nuanced answer. If needed please consider reaching out to Pega Consulting for further assistance.
About date format issue, I raised it with Pega GCS under SR reference SR-A3434 and final response from GCS as below
"BIX is just a raw extraction tool and Data formation (change) does not come under the scope of this tool, so it wouldn’t possible to entrain the enhancement request for this change."
Unfortunately no solution can be provided from pega in respect to this. It is not even possible via some hotfix or BIX product enhancements. Some alternative could be using the file software like XLS, if possible using some date conversion function.
Also according to the same above theory, answers stand for point 2 and 3 are that since BIX is raw extraction tool, hence no customisation can be made within extraction rule. The data stored in database in whatever format, they will be extracted into csv file. The control rule applied in property level won't work here as it just controls the display when displayed in some UI component in Pega but not considered in BIX extraction rule. Hence if you want 2 or 3 decimal value extraction then you need to think taking care while storing the data in database itself using decimal precision in property level so that decimal fields stored in in DB with 2 or 3 decimal precisions only.
As far as my knowledge in BIX, before calling the BIX exrtract rule we map property values according to our business. Let say, CreationDate column should be Date value then i format the pxCreateDateTime into Date value and set in to CreationDate property. in the same way i can assign the value to CreationDate based on some condition.