Using Where macro method on COM_SKU (Orders object)

Sandeep Knoesel asked on September 15, 2014 17:39

Dear all,

I'm trying to figure out how to use the Where macro method (or alternatively the Filter macro method) in the context of the Orders macro object and I haven't had any luck.

Any sample code to look at? I have had a lot of trouble finding anything on this.

Thanks, Daniel

Recent Answers

Sandeep Knoesel answered on September 15, 2014 19:40

Hi again,

Here's the macro I'm crafting to pull a COM_SKU custom field based on a WHERE clause: CurrentUser.PurchasedProducts.Where("[SKUNumber] LIKE 'povenue%'").FieldsAsObjects.SKUNumber.ItemsAsFields.SKULocationEventDate

Any insight would be greatly appreciated.


0 votesVote for this answer Mark as a Correct answer

Josef Dvorak answered on November 18, 2014 15:57 (last edited on December 10, 2019 02:30)


We have also been resolving this question via a regular support channel, but I would like to post an answer here, in case anyone else needs it in future.

Even though we were not certain about the precise goal, we were able to use this macro to access the desired property:

{%CurrentUser.PurchasedProducts.Where("[SKUNumber] LIKE '500'").FirstItem.SKULocationEventDate |(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.