Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
erp_curaden
Contributor II
Contributor II

Let variable returns String as field-attribute

I ran into another issue:

I was trying to assign a String to a "Let"-variable. However, whatever I try, it always returns the variable with "-quotes instead of ' (I use this variable in a "Where"-statement):

 

Example (in which $(currentCustomerEMail) is interpreted as a Field-value):

Let currentCustomerEMail='email@mail.com';

Load
Count(OrderEMail) As "NumberOfOrders"
Resident Order
Where $(currentCustomerEMail)='xyz';

 

Thanks for your help 😉

Labels (5)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

let's try using the below syntax:
Where '$(currentCustomerEMail)'='xyz';

View solution in original post

5 Replies
agigliotti
Partner - Champion
Partner - Champion

what are you trying to do with that load?

erp_curaden
Contributor II
Contributor II
Author

Hi Agigliotti,

This part of the code is contained within a loop. So I have a number of customers (IDs) and a series of dates (YearMonth) I'm looping through to get the count of orders for each timestamp (YearMonth).

agigliotti
Partner - Champion
Partner - Champion

i don't understand  Where $(currentCustomerEMail)='xyz';
what does it means?
what is the logic behind this condition?

erp_curaden
Contributor II
Contributor II
Author

I'm looping through a table of all orders, and I only want the ones where the Email address of the order table corresponds to the current customer in my loop.

agigliotti
Partner - Champion
Partner - Champion

let's try using the below syntax:
Where '$(currentCustomerEMail)'='xyz';