Skip to main content
Newcomer
Aug 29, 2022 9:50 AM UTC
Solved

Fields reference in a Connector Datasrc

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!

 

 

Member
Aug 29, 2022 6:10 PM UTC

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. 

6 replies

Member
Aug 29, 2022 4:17 PM UTC

Use args.line and use split operation.

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

apratsAuthor
Newcomer
Aug 29, 2022 4:44 PM UTC

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!

 

 

 

Member
Aug 29, 2022 6:07 PM UTC

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

Member
Aug 29, 2022 6:10 PM UTC

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. 

apratsAuthor
Newcomer
Aug 30, 2022 7:26 AM UTC

Thanks! It works absolutly fine.