cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IsaacR
Helper I
Helper I

Populate Text from Datatable

Hello,

 

I have researched every where but the closes I get is videos on how to extract data to an Excel. I want to extract it to a variable (DataTable) and be able to use that variable to input that data on another web page. I dont know what I have to put in order to input the data collected. I currently have it set up as 10 rows and 3 columns. The name of my Variable is OutputData.

 

Any help would be greatly appreciated.

 

Capture 1.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Daniel_Pa
Resolver II
Resolver II

Hi IssacR

 

@VJRI believe he is trying to input the text, seeing he has created a data table - correct me, if I'm wrong Issac?

If you are indeed trying to input the data from the variable, there are two basic ways to go about it.

 

1) Hardcode the values. The contents of a data table is represented in a variable as "%DataTable[Cloumn][Row]%" - thus, if you want the value of the first row and column, it can be written as %OutputData[0][0]% (counting from 0 and up).

2) Loop the values. You can use loops to iterate through the table. A For Each loop, will give you a new variable for each row, when looping through the data, from which you can reference the individual values from the column, on that row.

loopTable.png

View solution in original post

5 REPLIES 5
VJR
Super User
Super User

Hi @IsaacR 

 

It is a little confusing whether it is to a datatable or from a datatable.

 

The text in the title says "Populate Text from Datatable"

but the post says "want to extract it to a variable (DataTable)"

 

Can you elaborate from where and to where?

 

"...what I have to put in order to input the data collected."

Where have you collected the data?

 

 

Daniel_Pa
Resolver II
Resolver II

Hi IssacR

 

@VJRI believe he is trying to input the text, seeing he has created a data table - correct me, if I'm wrong Issac?

If you are indeed trying to input the data from the variable, there are two basic ways to go about it.

 

1) Hardcode the values. The contents of a data table is represented in a variable as "%DataTable[Cloumn][Row]%" - thus, if you want the value of the first row and column, it can be written as %OutputData[0][0]% (counting from 0 and up).

2) Loop the values. You can use loops to iterate through the table. A For Each loop, will give you a new variable for each row, when looping through the data, from which you can reference the individual values from the column, on that row.

loopTable.png

Danie_PA,

 

Thank you for the info. It is my first time working with DataTables. Usually I would extract each element as a variable individually since I am new to PAD but it would take forever to extract and it is a lot more leg work. I will give this a shot and report back. Thanks!

Sorry VJR,

 

I meant that I needed to extract the Data to a DataTable (which I have already been able to do) and then populate fields with the information I already extracted. I don't need help on the extracting the data part, just on the second part which is populating the fields.

Tested and works great! I appreciate your help.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Kudoed Authors
Users online (2,580)