gridgenexus

How to check if a SDT collection is empty


I'm having this grid to insert records into the database Grid with info. How can I check if there isn't any information on the grid when insert into the database when clicking 'Registration', like this Grid with no info. This grid is based on a SDT collection.


Solution

  • To check if an SDT collection is empty, use the count property. For example, if your collection is &SdtProducts, use &SdtProducts.Count to get the number of items in the collection. The count will return zero if there are no items in the collection.

    Although you don't describe your example in detail, it looks like you could also check against sum equals zero.