JDE Validation Problem

I have a very strange problem.I am using JDEWorld Adapter in
B2B.I am selecting some fields from my tables and generated
the record.Then I am mapping this record to some other
record and doing the validation against schema.I am getting
error in validation that Value is shorter than minimum.That
field is not at all mandatory and the schema defines that
field length to be string between 1 to 30.In my mapping step
I am putting condition on map to check the value.if there is
a value map it .For example in the copy only if box I am
putting %PurchaseOrder/Address2%.But with this condition too
I am getting zero string length in the map and its giving me
validation error.I know I can do the branch on the field and
check with condition (/.+/) but that will be a lot of work
to de because I have 80 fields like that so i have to branch
on every field and check.Is there any other way to resolve
it.Even I tried to use TRIM in my SQL statement but still
getting the validation error.Can I put any condition like
branch(/.+/) in my copy only if checkbox field.Anyone any


Hi, John.

Try setting the value of Copy only if equal to
“%PurchaseOrder/Address2% != null” and let me know if it


I would use the following condition in the map condition
box :

%PurchaseOrder/Address2% != null && %PurchaseOrder/Address2% != /^[ ]*/

This will only map if the Address2 field has atleast one
non-whitespace character.


One or another, you’ve got a lot of clicking and typing to
do! Using the map and “Copy only if” suffers from the need
to type in the fully-specified field name. In Rupinder’s
solution, it’s typed twice! Woe to the person that needs to
change a record or field name.

I’d say using a branch is the way to go. It’s more obvious
what is happening and is easier to maintain.

/.+/ will get any characters, including field containing
only whitespace.

I use /[^ ]/ successfully to select only fields that are not
null and not spaces.

Another approach to consider is to create a service that
accepts an input and returns an output only if the input was
not null, not spaces, not whitespace, etc.

Service: copyIfNotEmpty
Input: srcField
Output: tgtField

BRANCH on \srcField
…/[^ ]/: MAP – srcField --> tgtField
…$default: MAP – drop tgtField (just to be safe)

Then you can use this service as a transformer, mapping
multiple fields as needed in a single map step. This keeps
the functionality of the “Copy only if…” but keeps field
names from being typed into text boxes.

Just a thought.

Thanks a lot Rupinder and Rob.Yes Rob you are right to just
createa a one service and use it everywhere.