Cache request that populates dynamic dropdown

  • 23 November 2022
  • 2 replies

How can I cache the data that was fetched for dynamic dropdown?

I am building part of the action form based on user defined fields fetched from my API. 

key: 'user_define_fields',
label: 'Map user fields',
required: false,
list: true,
dynamic: '',
helpText: 'Choose custom fields to be mapped.',
altersDynamicFields: true,
function (z, bundle) {
if (!bundle.inputData.custom_fields) return [];

const selectedFields = (el, idx) {
return { key: el, type: 'string' };
return { key: 'user_defined_custom_fields', children: selectedFields };

The issue is that every time user opens the dropdown to add another field (another line item) the resource `customFields` is fetched again. Is this somehow possible to cache that request? 

2 replies

Userlevel 7
Badge +12

Rather than have the end user select fields one at a time… would it perhaps be easier to just load all the custom fields in as dynamic fields? 

Well, unfortunately that would rarely do the job. Most users have many custom fields and I think this solution tends to be more user friendly despite the loading time.