Posted: Tue Feb 07, 2023 6:42 am Post subject: XML empty Tags Input Message Validation
Novice
Joined: 04 Aug 2022 Posts: 14
Hello All,
Need Ur support as i am trying to validate on the incoming input message that all tags not empty , and incase its empty i will replace it
I need this to be dynamic not for a specific parameter , just once there is an empty value founded it will be replaced
Code:
IF EXISTS (InRef.:*[]) THEN
IF FIELDVALUE(InRef.:*[]) = '' THEN
SET OutputRoot.JSON.Data.newtag1= '""';
SET OutputRoot.JSON.Data.newtag2 = '""';
ELSE
SET OutputRoot.JSON.Data.newtag1=
InputRoot.XMLNSC.ns:AddRequest.MessageBody.tag1;
SET OutputRoot.JSON.Data.newtag2=
InputRoot.XMLNSC.ns:AddRequest.MessageBody.tag2;
END IF;
END IF;
Note :
The code above just validate on the first parameter if it's empty , if there 3ed or 2nd parameters empty it will be not included
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum