How can I get my CAML to only return non-hidden (user created) fields without specifing every field?

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/144690

  •  04-10-2020
  •  | 
  •  

Domanda

I can provide the ViewFields but I was wondering if there is a way to return all the user created fields (non-hidden ones) without having to do that.

I know this works:

<ViewFields>
    <FieldRef Name="UserCreatedField1" />
    <FieldRef Name="UserCreatedField2" />
    <FieldRef Name="UserCreatedField..." />
    <FieldRef Name="UserCreatedFieldX" />
</ViewFields>

But I'm hoping there is an easier way then specifying each FieldRef.

È stato utile?

Soluzione

You need to explicitly request for each fields you want.

Altri suggerimenti

You may first connect to list programmatically and get all feilds as collection then look for non hidden fields and you get non hidden fields collection. Then write your own caml query with collection.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top