Salesforce does not allow you to use variables in your Aura IDs to dynamically set your destination sObjects. However, Fonteva has created a mechanism using the value, secondaryId, and useSecondaryId attributes to configure the destination for your inputField data dynamically. For example, if you want to instantiate a component based on multiple fields but you're not sure what fields you'll need, you can use the secondaryId to pull an array of fields.

The secondaryId attribute allows you to pass a variable into your value map while still using your specific Aura ID to find the component. In the below code example, multiple fields are displayed with the Aura ID contactField. That fieldset is using the API name of the field as the secondaryId to generate the entire fieldset on the fly.

fieldType="{!contactField.fieldType}"
	group="{!v.uniqueIdentifier}"
	aura:id="contactField"
	label="{!contactField.label}"
	secondaryId="{!contactField.fieldKey}"
	otherAttributes="{!contactField.otherAttributes}"
	useSecondaryId="true"
	styleClasses="wrapper-input"
	isRequired="true"
	value="{!v.customerObj}" />
JS