cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MayShmulevich
Frequent Visitor

Setting a property as a variable

Hi Everyone,

I have a data table which I want to extract only the data from 1 specific column (Tracking No.).

I tried to extract it with "For each" loop, but the problem is that I have to specify the property.

I tried to set a variable for the property as a "0" and then in the "For each" loop I will again set a variable for +1, so it can always extract the next property, but when I try to set the value to iterate, It gives me a "Syntax error".

%ExcelData[%Property%]['Tracking No.']%

Any help how can I use the variable inside the value to iterate?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Henrik_M
Super User
Super User

All % signs come in pairs, so your expression is interpreted in two parts:

%ExcelData[%Property%]['Tracking No.']%

 

This is obviously not what you want. You have to construct the expression with just one pair of %s:

%ExcelData[Property]['Tracking No.']%

 

Words inside expressions are (almost) always used as variable references, while text between quotation marks identifies columns.

View solution in original post

2 REPLIES 2
Henrik_M
Super User
Super User

All % signs come in pairs, so your expression is interpreted in two parts:

%ExcelData[%Property%]['Tracking No.']%

 

This is obviously not what you want. You have to construct the expression with just one pair of %s:

%ExcelData[Property]['Tracking No.']%

 

Words inside expressions are (almost) always used as variable references, while text between quotation marks identifies columns.

Hi Henrik, thank you for you reply!

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Top Solution Authors
Top Kudoed Authors
Users online (1,958)