Adding Or logic to working Sharepoint If XSL:IF

Matt Pinkston
Matt Pinkston used Ask the Experts™
on
I have the following logic I have used in my custom sharepoint code for a while and it works well, however I need to be able to compare with ORs

example if @Qualification_x0020_Review_x0020 = Yes(Approved)  OR @Qualification_x0020_Review_x0020 = Yes OR @Qualification_x0020_Review_x0020 = Good

<xsl:if test="normalize-space(@Qualification_x0020_Review_x0020) = 'YES (Approved)'">
     <img alt="" src="images/green.gif" />
</xsl:if>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Matt PinkstonEnterprise Architect

Author

Commented:
I tried this and get an error
<xsl:if test="normalize-space(@Contract_x0020_Type) = ('Fixed Price Level of Effort','Fixed Unit Price','Firmed Fixed Price','Hybrid')">
Top Expert 2014
Commented:
I saw somewhere code suggesting to use a param to create a sequence of strings.
That would be, before the <template>:
<xsl:param name="values">
<value>Fixed Price Level of Effort</value>
<value>Fixed Unit Price</value>
<value>Firmed Fixed Price</value>
<value>Hybrid</value>
</xsl:param>

Open in new window

and using it like
<xsl:if test="normalize-space(@Contract_x0020_Type) = document('')/xsl:stylesheet/xsl:param/*">

Open in new window

kukdaiSharePoint SME

Commented:
Is it a web part that you are trying to edit using SharePoint designer? can you provide more details what is it. Where you are trying to use this code. Is it a SharePoint Solution created in VS Studio or Editing in SharePoint designer.
Matt PinkstonEnterprise Architect

Author

Commented:
Thanks for the assistance

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial