Tue Aug 20, 2019 4:04 pm
Login Register Lost Password? Contact Us


Field Removal from Record Definition

Comments and questions related to the Enterprise Control Language

Tue Aug 06, 2019 7:37 pm Change Time Zone

Hi Guys,

Is it possible to remove one (or more) fields from a record definition that uses another record definition?

Code: Select all
lMyLayout01 := RECORD
  STRING field01;
  STRING field02;
  STRING fieldToRemove;
END;


/*****
* Remove 'fieldToRemove' from lMyLayout01 here, so we would have, field01, field02 and field03.
*****/
lMyLayout02 := RECORD
  lMyLayout01;
  STRING field03
END;


If Im not wrong, I saw something like this during the ECL course, but I wasn't able to find.

Thanks in advance,

Att.
Artur Baruchi
abaruchi
 
Posts: 12
Joined: Thu Apr 18, 2019 4:50 pm

Tue Aug 06, 2019 7:59 pm Change Time Zone

Artur,
Is it possible to remove one (or more) fields from a record definition that uses another record definition?
Yes. In the RECORD structure docs look at the section titled "Field Inheritance" and you'll see the exception list format, like this:
Code: Select all
lMyLayout01 := RECORD
  STRING field01;
  STRING field02;
  STRING fieldToRemove;
END;


/*****
* Remove 'fieldToRemove' from lMyLayout01 here, so we would have, field01, field02 and field03.
*****/
lMyLayout02 := RECORD
  lMyLayout01 AND NOT fieldToRemove;
  STRING field03
END;

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1472
Joined: Wed Oct 26, 2011 7:40 pm


Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest

cron