Build data table and values will be variables which has data stores in them

I want to Build a data table and give column names and in values I need the data from the Variables to push through when I use please guide.

Hi @Rajat2

Use Build Data Table to define column names.
Then Add Data Row to insert values from variables. set ArrayRow as {var1, var2, var3} matching the column order.
Lastly sore the result in a DataTable variable.

If you found helpful please mark as a solution. Thanks
Happy Automation with UiPath

@prashant1603765

How to fix this

@Rajat2 {CarDuration, CarDistance, BikeDuration,BikeDistance}

Yes pls seperated with comma,
Create like below example,

Variables:
CarDuration = “30 mins”
CarDistance = “15 km”
BikeDuration = “45 mins”
BikeDistance = “10 km”

Build Data Table:
Columns → CarDuration, CarDistance, BikeDuration, BikeDistance
Output → dtTransport

Add Data Row:
ArrayRow → {CarDuration, CarDistance, BikeDuration, BikeDistance}
DataTable → dtTransport

This adds one row with variable values to the DataTable.