コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Managing a condition from an element of a collection (Transacctional message)

Avatar

Level 2

Hi,
I have a request where I need to apply a different format when a condition is false.
This condition must affect to a line of a collection of articles (an article of a product list)
I have created a boolean element within a collection, however the boolean I have create is not available when I try to applicate a new condition to a field of the transacctional message.
Is there are way to use this kind of element (of a collection) as a event to be used as a condition?

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi @bravoga1977,

 

Try to create content block and reference the same in product listing to see if it works. It will look like something below,

 

<table>
<% for (var i =0; i < context.rtEvent.ctx.articleCollection.length; i++) { %>
<% if (context.rtEvent.ctx.articleCollection[i].articleAvailable == true) { %>
<tr>
<td>
<table>
<tbody>
<tr>
<td >
<%= context.rtEvent.ctx.articleCollection[i].articleName %>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<% } %>
<% } %>
</table>

Thanks, Sathees

元の投稿で解決策を見る

4 返信

Avatar

正解者
Community Advisor

Hi @bravoga1977,

 

Try to create content block and reference the same in product listing to see if it works. It will look like something below,

 

<table>
<% for (var i =0; i < context.rtEvent.ctx.articleCollection.length; i++) { %>
<% if (context.rtEvent.ctx.articleCollection[i].articleAvailable == true) { %>
<tr>
<td>
<table>
<tbody>
<tr>
<td >
<%= context.rtEvent.ctx.articleCollection[i].articleName %>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<% } %>
<% } %>
</table>

Thanks, Sathees

Avatar

Administrator

Hi @bravoga1977,

Was @SatheeskannaK's solution helpful to resolve your query? In case it was helpful, then kindly choose it as the 'Correct Reply'. If not and you still need more help, then do let us know.

Thanks!



Sukrity Wadhwa

Avatar

Level 2

Hi @Sukrity_Wadhwa,

 

Well, it was not the solution I was looking for but guided me a bit on the path to follow.

Thanks!

Avatar

Administrator

Glad to know it helped you a bit. 🙂 

Could you please share the solution with the rest of the Community as well so that it helps them too in case they are facing the same issue? 

Thanks!



Sukrity Wadhwa