Leveraging the Variables functionality in custom tables

stevejarman
Giga Guru

We are in the process of planning the design of a Finance module to replace the functionality of the deprecated Finance Service Management plugin.

Where I'm coming up short is how to implement the "variables" field on a custom table (call it "finance_request"), so that Record Producers targeting finance_request can leverage the Variables Related List for questions/answers, in the same way as a "normal" Catalog Item, or one of the "real" Service Management plugin Record Producers (i.e. Finance, Legal, Marketing, etc).

I've noticed that when you create a custom table, the "Variables" field type is not available for use, seemingly making it impossible to implement this functionality on a custom table, without knowing some "trick".

Does anyone know what the criteria is for being able to create fields of the "Variables" type? And/or any documentation on this subject that might be helpful?

Examples below of 2 OOB tables that make use of the Variables field type. This seems to be the main missing ingredient for what we're trying to do. Everything else should be relatively straight-forward(ish).

find_real_file.png

 

find_real_file.png

 

find_real_file.png

10 REPLIES 10

stevejarman
Giga Guru

I guess what's really missing for me on all of these suggestions is the ability to programmatically access the variables object after the submission, in the same way that I can with a "regular" Catalog Item or Record Producer. e.g.

var rs = new GlideRecord("sc_req_item");
rs.query();

while (rs.next()) {
    gs.log(rs.variables.requested_by);
}

Is that just impossible to do with a custom table (i.e. due to not being able to create the "Variables" field on the table itself)?