What is the proper output of a picklist source snippet?

Seth LeonardSeth Leonard Member
edited May 2018 in Questions
I'm trying to create a picklist of the last 5 years and the next 5 years for a UI-only picklist field. What's the proper output/return value? Or am I rendering directly in the snippet? I can't find documentation anywhere.

Thanks,
Seth

Comments

  • Amy DewaalAmy Dewaal Member, Skuad ✭✭
    edited May 2018
    You'll need to return an object from the snippet with specific properties. You can look at this documentation to see the format of the picklist object. Here's an example snippet:
    var params = arguments[0], $ = skuid.$;
    var entries = [];
    entries.push(
       { value: 'Working', label: 'Working', defaultValue: false  },
       { value: 'Submitted', label: 'Submitted', defaultValue: false }
    );
    return entries; 
Sign In or Register to comment.