How to Access Values of Input Field of a List Type "any thing"...?

hi @antony
Looks like you’re basically there… The below would be how I would use Server Side action to retrieve items from a list and publish them back. This works for “any thing”, provided you know the name of your object’s target field.

And if you don’t know the name of that field you can either:

  1. get your user to specify it… add an ‘App Type’ field to your plugin action, followed by a ‘Fields of name of previous field’ field… this will force them to specify
  2. work it out within the code… use properties.anythinglist.listProperties() to fetch all of the available fields then pick one

Anyway, here’s the code. It’s no different from what you are suggesting to be honest, but I can testify to this working.

    let items = [];
    let len = properties.list.length();
        let listObjects = properties.list.get(0,len);
        for (var c=0;c<len;c++) {
                    items[c] = listObjects[c].get('_field_name_')
        };

    return {
        'key' : items
    };
5 Likes