Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
wjalford
Level III

Skip lines of script if the table is empty.

I am quering a database that currently does not yet have the information that I am quering but will in the near future.  So right now I get an empty table.  I would like to add the functionality to skip certain lines in my code that pertain to the empty table and move on with the remaining part of my code that deals with other data sources.  Can someone give me a way to check if the table is empty?

 

Thank you,

 

Wayne

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Skip lines of script if the table is empty.

@uday_guntupalli  provided a good link, to determine if no data table was created, however, the data table may be created, but no rows are populated.  To check for this, you need to check to see if N Rows() are greater than 0.  So look in the Scripting Index for    N Rows()  too

Jim

View solution in original post

3 REPLIES 3
Highlighted
uday_guntupalli
Level VIII

Re: Skip lines of script if the table is empty.

Help > Scripting Index > Is Empty

Best
Uday
Highlighted
txnelson
Super User

Re: Skip lines of script if the table is empty.

@uday_guntupalli  provided a good link, to determine if no data table was created, however, the data table may be created, but no rows are populated.  To check for this, you need to check to see if N Rows() are greater than 0.  So look in the Scripting Index for    N Rows()  too

Jim

View solution in original post

Highlighted
wjalford
Level III

Re: Skip lines of script if the table is empty.

Jim,

 

Thank you.  I used N rows(dt) >0.  Worked perfectly.

 

Wayne

Article Labels

    There are no labels assigned to this post.