dt3 = dt2 << Split(
Split By( :ONP ),
Split( <STRONG>:GLE</STRONG>,<STRONG> :OTS</STRONG> ),
Output Table( "Split_data" ),
Sort by Column Property);This is a part of the automation script i made which is ran on daily schedule -- somehow some datasets ran with this script doesnt contain both columns i.e GLE and OTS, How do i split dt2 such that it checks first if the dataset if it contains either(GLE only/OTS only) or both of them(GLE & OTS) and somehow splits the table?
Here is the most straight forward version.....not the prettiest.
If(
Try( dt2:GLE << get name, "" ) != "" &
Try( dt2:OTS << get name, "" ) != "",
dt3 = dt2 << Split(
Split By( :ONP ),
Split( :GLE, :OTS ),
Output Table( "Split_data" ),
Sort by Column Property
),
Try( dt2:GLE << get name, "" ) != "",
dt3 = dt2 << Split(
Split By( :ONP ),
Split( :GLE ),
Output Table( "Split_data" ),
Sort by Column Property
),
Try( dt2:OTS << get name, "" ) != "",
dt3 = dt2 << Split(
Split By( :ONP ),
Split( :OTS ),
Output Table( "Split_data" ),
Sort by Column Property
)
);