Skip to main content
Nintex Community Menu Bar
Question

Access field metadata in builder?

  • July 9, 2024
  • 3 replies
  • 32 views

Forum|alt.badge.img+18

Another custom component question. 🙂

I have a model property on a custom component.

I’d like to create a picklist property where the picklistEntries are defined by the metadata for a picklist field in the specified model.

Even better, I could dynamically create a model on the desired sObject and get the picklistEntries from a field that way.

I’ve tried both, without success.

It seems like skuid.$M() returns undefined even when the model ‘exists’… I suspect that a model has to be loaded for that to work?  What if I create a model new model with skuid.model.Model() in the builders.js and call .initialize().load()?

Here’s my real question: Is there a way to access field metatdata on the builder-side in order to dynamically define picklist entries for a component property?

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+18
  • Author
  • July 9, 2024

It Works!

I created a model with new skuid.model.Model(), and then used .initialize().register().load().

Not sure if I need all three of those… but it’s working. 🙂

If there’s a better way to accomplish this, I’d love to know.

Thanks!


Forum|alt.badge.img+13

Creating a fake Model would work. Right now the Skuid Composer doesn’t always load picklist entries for all fields — to conserve memory, since this can be a TON of Picklist Entries for some folks’ Picklist fields — so there’s not a function I can point you to, unfortunately.


Forum|alt.badge.img+18
  • Author
  • July 9, 2024

Zack, et al.,

What does the getMetadataForField() function do in skuid.builder.core?
Would that address the need to access a field’s picklist entries on the builder side?