Check for the existence of fields in a row
The following code examples check for the existence of fields in rows:
var idx = getInputRowMeta().indexOfValue("lookup");
if ( idx < 0 )
{
var lookupValue = 0;
}
else
{
var lookupValue = row[idx];
}
With Compatibility mode selected:
var idx = row.searchValueIndex("lookup");
if ( idx < 0 )
{
var lookupValue = 0;
}
else
{
var lookupValue = row.getValue(idx);
}
You cannot mix rows in PDI. All rows flowing over a single hop must have the same name, type, and number of fields.
Last updated
Was this helpful?