Subscribe Bookmark RSS Feed

What is the best way to assess if a column has an entry or not

csoon1

Community Trekker

Joined:

Feb 9, 2016

Hi. I have the code below where I go through all columns on my table and add them to a list. It works fine. However, I just realized now that there is no point adding columns on my list that do not even include an entry (or is empty). Now I want to update my code below to include an "if" statement perhaps that if a column does not contain any data or entry, then I'll simply ignore it. What's the best way or method to implement this? Thanks.

 

 

// Populate X Group list
Insert Into( xGroupList, "Site" );
For( j = i, j <= N Cols( Data Table( a ) ), j++,
	Insert Into( xGroupList, Column( Data Table( a ), j ) << Get Name )
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

If(col number(:age),==0, ...... );

 

this works for both numeric and character columns

Jim
2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

If(col number(:age),==0, ...... );

 

this works for both numeric and character columns

Jim
csoon1

Community Trekker

Joined:

Feb 9, 2016

Thanks! It worked.