fixedCollection: load options based on another field in fixedCollection

Hi,

There is a situation, where I have 2 fields in a fixedCollection, (1. FieldName 2. FieldValue)
Both of these needs to be dropdown and both will populate dropdown list via API call.

Now getting content for ‘FieldName’ is straight forward but for ‘FieldValue’ my options would depend on the selected FieldName. Any pointers on how to achieve this ?

Here is my fixedCollection:

             {
    				displayName: 'Properties',
    				name: 'properties',
    				displayOptions: {
    					show: {
    						operation: [
    							'update'
    						]
    					}
    				},
    				type: 'fixedCollection',
    				typeOptions: {
    					multipleValues: true,
    					multipleValueButtonText: 'Add Property',
    				},
    				default: {},
    				description: 'Properties to update',
    				placeholder: 'Add Property',
    				options: [
    					{
    						name: 'item',
    						displayName: 'Item',
    						values: [
    							{
    								displayName: 'Field',
    								name: 'field',
    								type: 'options',
    								typeOptions: {
    									loadOptionsMethod: 'getTemplateFields',
    								},
    								required: true,
    								default: '',
    								description: 'Field to be updated.'
    							},
    							{
    								displayName: 'Value',
    								name: 'value',
    								type: 'options',
    								typeOptions: {
    									loadOptionsMethod: 'getValueChoices',
    								},
    								required: true,
    								default: '',
    								description: 'Value to update field with.'
    							}
    						]
    					}
    				]
    			}

Questions:

  • For ‘value’ property, how do I use loadOptionsDependsOn: [‘field’] in this case ?
  • And Inside getValueChoices() how can I get selected field value for the current item?