I have a 'normal loading procedure and a mapping load. I would like to pass a variable to pass to this mapping load to be used within a subfield.
Within this example : the outcome of ApplyMap('Contact', Rel_Source_ID, '') is stored to the variable $Variable. This value $Variable should be used to read the nth field of the field Itemlijst where the Source_ID is the 'search string' for this mapping.
Re: Script mapping load uses variable for subfield.
A load statement returns records with fields that have values. A load statement cannot directly assign a value to a variable. So applymap cannot store a value in a variable. The AS $Variable would create a field named $Variable.
If you want to use the variable in the subfield function then you need to create that variable before creating the mapping table. The mapping table must exist before an applymap can use it to look up values.