Share via


OkToVote Element

Applies to: SharePoint Foundation 2010

Used to determine whether a specific user can vote in a survey.

<OkToVote>
</OkToVote>

Attributes

Attribute

Description

None

N/A

Child Elements

None

Parent Elements

Numerous

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

This element requires that a SetList element be implemented for the appropriate survey; otherwise, the behavior of the OkToVote element is undefined.

The OkToVote element renders as follows:

  • 0 — It is OK for the currently authenticated user to vote in the survey whose internal name is u_Survey.

  • 1 — The user cannot vote because u_Survey has no questions.

  • 2 — The user cannot vote because he or she has already voted in this survey.

This element can be combined with a Switch statement to take actions, depending on the user's status in relation to a particular survey.