Related Item - Filter twice with Data Source and CAML-View possible?

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
slashmaster
Posts: 29
Joined: Fri May 25, 2018

10 Feb 2020

Hi,

i want to filter and show related Items. The first filter works fine: Data Source - Filter by Form field.
I got a Choice-Column "Status" (possible entries 'open', 'in work', 'question') and i want to Show only this items where are 'Status=open'.

In the "Extended"-Option, i edit the "View" without success:

[…]
<Query />
<Where>
<Eq>
<FieldRef Name="Status" />
<Value Type="Choice">open</Value>
</Eq>
</Where>
[…]

It is possible to filter in CAML-View?

thanks in advanced

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

10 Feb 2020

Hello slashmaster,

Yes, you can filter the list view with the CAML query. Please see the code sample below.

Code: Select all

[...]
  <Query>
    <Where>
      <Eq> 
	<FieldRef Name="Status" /><Value Type="Choice">open</Value></Eq>
    </Where>
  </Query>
[...]
Or you can apply a filter in the list view settings. Go to List Settings >> Views.
ListView.PNG
ListView.PNG (62.95 KiB) Viewed 4640 times

slashmaster
Posts: 29
Joined: Fri May 25, 2018

11 Feb 2020

Good Morning mnikitina,

thank u very much, it works as expected!

Kind regards

slashmaster
Posts: 29
Joined: Fri May 25, 2018

22 Apr 2020

Hi mnikitina,

it is possible to filter dynamic based on Form-Field-Value? I want to get all related Items where are in the same Department (for that i use DateSource - Filter by Form-Field) and Status eq to Status from Form-Field i load (not fixed "open" like in your Code/answer below).

thanks in advanced :)

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

23 Apr 2020

Hello slashmaster,

Yes, it is possible. Please find the setup instructions in the Dynamic filtering of the Related Items list on a SharePoint form article.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests