모든 변경 사항을 목록으로 보거나 내보내는 방법 >> 선택 필드 필드를 선택하십시오.

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

  •  10-12-2019
  •  | 
  •  

문제

사용자가 "채우기"항목을 사용할 수있는 선택 필드가있는 목록이 있습니다. 어떻게 든 사용자가 "채우기"항목으로 추가 된 선택 옵션을 확인하고 싶습니다. 또는 원래 선택 옵션 목록을 결정하십시오.

어느 쪽이든, 목록이 작성 될 때 사용자가 입력 된 VS 원래 선택 항목을 구별하는 방법이 필요합니다.

SharePoint 2010 기업을 사용하고 있습니다. 고마워,

도움이 되었습니까?

해결책

Descerning the original values from the user filled-in is easy, as the additional values entered by a user are not added to the original choice field definition, which will remain unaltered.

So, in order to retrieve all the list items where the choice field value is not one of the predefined values, you need to build a CAML query with the NEQ operator on the choice field. Eg:

<Where>

<Neq>

<FieldRef Name='MyField'/><Value Type='Choice'>Choice1</Value>

</Neq>

</Where>

So, to say it in English, the idea is to retrieve all the list items where the choice field value is not equal to any of the predefined values. You can get all the predefined values of a choice field with both JSOM and C#. For an example of using the JSOM see this post on SE

UPDATE

See the screenshots below to better understand what I mean:

  1. here's the original choice field definition enter image description here

  2. here's the new item form. enter image description here

As you can see on the left, the list has two items with custom (filled-in) values for the choice field (custom value1 and custom value2). However, the dropdown on the new form, still shows only the 3 choices that were originally set when creating the ChoiceField column.

This is what I meant: for any value you can find on an item ChoiceField field, you can always tell if it is one of the predefined values (Choice #1;Choice #2;Choice #3) or a custom value inserted by the user.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top