Getting cdt data from a dse

Certified Senior Developer

I have an expression that takes in a dse and spits out the column names of everything in that dse. Unfortunately, the way it does this is by querying the dse and then running a!keys() on the first entry of the result to figure that all out. While this works perfectly well when the dse has values in it, it will error out if the table is empty. So is there any way to get the same information directly from a DSE that doesn't have data in it? 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    I have a milestone component that is used across everything in the application. There are various different activities that require the milestone, but each has its own set of steps. The steps themselves are held in one table that basically builds out the milestone based on the name of the activity type. But to know which step on the milestone the milestone is supposed to be, I need to query up data from that particular activity's history table. Each activity has a different history table, so one of the rule inputs is the history table's dse. The layouts of these tables are all different, so I need to be able to basically pull up the list of column names and figure out which column has the exact data I need to tell the milestone I'm on step x.

    Now normally there is something in the history table, so it being empty isn't USUALLY a big deal, except for the very first time you create a particular activity of a particular type. I can manually throw in some dummy value in the backend of course, but I'd rather not do that if there is a better way. 

Children