Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

How to add Multiple fetchxml dynamic conditions from in liquid Portal

$
0
0

Hi All

 

From Page 1 adding query strings as section id and categories (Multiselect), but when trying to add these parameters to filter fetch, unable to get correct result... not sure if the below liquid statements are forming correct filter conditions as below

https://abc.powerappsportals.com/Sections/TestDoc/?Id=df286076-b9c6-eb11-bacc-0022481d870a&Category=1,3,8

 

<filter type="and" >

<condition attribute="new_categories" operator="contain-values" >
<value>1</value>

<value>3</value>
<value>8</value>
</condition>

<condition attribute="new_section" operator="eq" value="{12345667-34343434343-BACC-abcdefghi}" uiname="Marketing" uitype="new_section" />

</filter>

 

To form above condition I do use below liquid….but filter happens only for section id and not with categories

{% assign SectionId={{request.params.id}} %}

{% assign SectionId1={{request.url}} %}

{% assign beatles = {{SectionId1}} | split: "&" %}

{% assign Test = "None" %}

{% for member in beatles %}

{% capture my_variable %}

{{member}}

{% endcapture %}

{% endfor %}

{%- assign beatles1 = {{my_variable}} | split: "=" -%}

{% for member in beatles1| lstrip %}

{% capture my_variable1 %}

{{-member-}}{% endcapture %}

{% endfor %}

{%- assign beatles2 = {{-my_variable1-}} | split: "," -%}

{% capture my_variable3 %}

{% for member in beatles2 %}

{% capture my_variable2 %}{{"<value>"|escape}}{{member|strip}}{{"</value>"|escape}}

{% endcapture %}

{{my_variable2}}

{% endfor %}

{% endcapture %}


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>