Is there some form of "If table provides the column..."?

I remember there is handy syntax to avoid run-time errors such as

if the noun provides the property lockable: (do stuff)

I was wondering if there was something similar for tables. But my brute force tries didn’t work e.g.

if ta provides the column name detailed-sort, (do stuff)

Now a workaround would be

to decide whether (ta - a table name) is need-detailed-sort:
    repeat running through ta:
        if there is a detailed-sort entry, yes;

But of course this is more than a bit awkward and time-consuming to do more than once.

It would be enough (and probbly handy later) also if I could do either one of these:

let Y be the list of column names of ta; [where ta is a table name]
let Y be the number of columns in ta;

So, are there any diagnostic commands for tables I’m missing? I’m also OK with having to use Inform 6 to get them.


Possibly relevant, though I’m not sure if it’s still up to date: Testing whether there is a given space or column in a table


Thanks, yes, just what I needed! This helps with my present problem and likely some future ones too.

It looks like my searches failed me. I tried “check if column is in table” but “test” brings the original topic up quickly.

I’d like to add, for future searches: this lets you check if a column is in a table, or a table contains a column, or a column is present in a table.