Question

Obj-Browse on external table with char data type as key field, how to trim db field and compare?

Hi,

Doing Obj-Browse on external table as below

CREATE TABLE unitmaster (unitcode char(2) PRIMARY KEY, unitdesc varchar(50));
INSERT INTO unitmaster VALUES(1, 'unit 1');
INSERT INTO unitmaster VALUES(2, 'unit 2');

I have a logic defined on unitcode Is Equal to the Param.unitcode to match the record.

it is not retrieving the data, I tried to apply trim on .unitcode of external table as it is defined as char data type, but it is throwing

Data-unitmaster@String.trim(.unitcode) is undefined

Regards

Vinoth, S

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
December 18, 2017 - 5:51am

Hello!

Vinoth has reached this solution: "Applied obj-filter on top of obj-browse to get the desired result solves the problem. It is ok because the number of records in database table is in single digit only."

Regards,

Comments

Keep up to date on this post and subscribe to comments

November 20, 2017 - 12:07pm

Hey,

Which property is the UNITCODE column mapped to?
Could it be something as simple as your property being in camel case in Pega (.UnitCode)? Properties are case sensitive.

Mod
December 18, 2017 - 5:51am

Hello!

Vinoth has reached this solution: "Applied obj-filter on top of obj-browse to get the desired result solves the problem. It is ok because the number of records in database table is in single digit only."

Regards,

Lochana | Community Moderator | Pegasystems Inc.