Error in creating Derived Columns

Hi,

I’m trying to create a reference column for using bulk add data to queue to my input data table. I’m trying to create values for that column by using derived columns concept. Following are the screenshots that I make use of for that

image


My Input DT Looks as follows:

[FlyingFrom,FlyingTo,Multi City,Departing Date,Return Date,Multi City Date,Direct Flight,Adult,Child,Infant,Reference
Ahemdabad,Jaipur,Mumbai,15-07-2024,29-02-2024,Yes,2,2,1,
Mumbai,Bangaluru,16-07-2024,15-07-2024,Yes,3,1,1,
Bangaluru,Pune,17-07-2024,17-07-2024,Yes,6,1,10,
Vadodara,Chandigarh,18-07-2024,17-07-2024,Yes,0,1,3,
Hyderabad,Bangaluru,19-07-2024,Yes,2,3,11,
Kolkata,Pune,20-07-2024,20-07-2024,Yes,0,2,1,
Pune,Srinagar,Mumbai,21-07-2024,29-02-2024,Yes,0,10,2,
Chandigarh,Kolkata,22-07-2024,17-06-2024,Yes,3,21,2,
Srinagar,Jaipur,23-07-2024,18-08-2024,Yes,0,5,3,
Jaipur,Mumbai,24-07-2024,19-08-2024,Yes,35,0,4,
Ahemdabad,Hyderabad,25-07-2024,20-08-2024,Yes,22,1,7,
Bangaluru,26-07-2024,21-08-2024,Yes,2,0,2,
Kolkata,Mumbai,27-07-2024,29-02-2024,Yes,4,3,0,
Pune,Jaipur,28-07-2024,29-08-2024,Yes,1,2,0,
Chandigarh,Pune,29-07-2024,17-13-2024,Yes,4,2,0,
Mumbai,Jaipur,30-07-2024,17-11-2024,Yes,11,10,0,
Hyderabad,Chandigarh,31-07-2024,07-05-2024,Yes,22,11,0,
Srinagar,Kolkata,01-08-2024,07-05-2024,Yes,2,2,2,
Vadodara,Hyderabad,02-08-2024,07-05-2024,Yes,1,
Ahemdabad,Jaipur,03-08-2024,07-05-2024,Yes,2,2,0,
Hyderabad,Jaipur,04-13-2024,07-05-2024,Yes,7,
Srinagar,Mumbai,Jaipur,05-08-2024,29-02-2024,Yes,22,2,0,
,Vadodara,06-08-2024,07-05-2024,Yes,10,
Pune,Kolkata,07-08-2024,07-05-2024,Yes,15,2,2,
Bangaluru,Jaipur,08-08-2025,17-02-2025,Yes,
Kolkata,Chandigarh,09-08-2024,07-05-2024,Yes,11,
Bangaluru,Kolkata,10-08-2024,17-02-2025,Yes,8,
Mumbai,Pune,Hyderabad,11-08-2024,22-08-2026,29-02-2024,Yes,2,1,0,
Ahemdabad,Bhubaneswar,29-04-2024,29-05-2024,Yes,2,1,1,
]

When I am using child in the assign activity I’m getting the following error:

If I remove Child in the expression then it is working fine. I’m unable find the cause of the above error can someone help me in this please.

Hi @Babjee.Vangipurapu
Can i know what exact output your looking for?

Hi @yedukondaluaregala

I want to create a unique reference number by concatenating the columns. In the Queue I’ve a checked unique reference while creating the queue so for that I need this reference column to be created.

1.Make sure that column name is avaialable in your datatable.
2.Try with this “Flyingfrom+FlyingTo+Child+…” .tostring
3.When i am trying i am getting without any issues, close your project and reopen the flow nd try to rerun the flow

Hi @Babjee.Vangipurapu

Try this

DT.Columns("Reference").Expression="[Flying From]+' ' +[Flying To]+' '+[Adult]+' '+[Child]+' '+[Infant]"

Regards,

@Babjee.Vangipurapu

DT.Columns("Reference").Expression="[Flying From]+' ' +[Flying To]+' '+[Adult]+' '+[Child]+' '+[Infant]"

Output:

Regards,

Thanks @lrtetala it’s working now

1 Like

HI @lrtetala ,

If we have column data in another Data Table and if we want to write the above expression Is that possible? If yes, how do we do that ?

For that you can use merge both tables by using merge datatable activity, and you can go with same flow with merge datatable Output

But if we don’t have the Data Table structure same then can we merge them?

@Babjee.Vangipurapu Yes, If both the tables have a some column then we can join them and do further manipulation!

Regards,
Ajay Mishra

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.