Fields reference in a Connector Datasrc

aprats
New Contributor II

Hi all, 

I need to assign a value in a field, dependeing on an other. I can do it in Delimited Files using  "api.Parser.DelimitedParsedValues()" but I don't know wich function can provide me the string of an other field.

So, in conclusion: how can I do this in a Connector Complex expression?

 

aprats_0-1661766456401.png

Thanks!

 

 

1 ACCEPTED SOLUTION

If you are using multiple fields then I would do it as 

Dim fieldValues as String() = args.line.split(",")

Then fieldValues(0) is first column and filed values(3) is 4th column. 

View solution in original post

6 REPLIES 6

Use args.line and use split operation.

args.line.split(",")(1)

aprats
New Contributor II

Thank you so much for your help.

I have a doubt: how the system know the field that I need?

This are my list of fields:

aprats_0-1661791181181.png

My args is INTERCO. I need to evaluate the OBJ field and depending on this, assign an INTERCO value.

If I use args.line.split(",")(1) I'm referencing the fist field from my list?

Thank you very much!

 

 

 

That is a zero-indexed item, so in your case it is 3

Celvin, any options for parsing where the field values have commas? Can I call a column based on the column name from a complex expression where the data is coming through using a connector rule?

If you are using multiple fields then I would do it as 

Dim fieldValues as String() = args.line.split(",")

Then fieldValues(0) is first column and filed values(3) is 4th column. 

aprats
New Contributor II

Thanks! It works absolutly fine.