Skip to main content
Inspiring
June 5, 2012
Answered

Using wildcard in If statement

  • June 5, 2012
  • 1 reply
  • 920 views

Hi. I have 2 part numbers I'm trying to find and I just want to display the text below on these 2 parts only. The 2 part numbers are:

PL-PLCC44-S-01TR

PL-PLCC68-S-01TR

This is not on a search page, so the Like command does not work.I created this If statement and when I put the whole part number in the quotes, it works fine, but I want to use a wildcard since there will be more parts like this and I will not want to keep adding parts to this If statement.So basically, I'm trying to search for all the part numbers that end in TR. If they do, display the text below on the page. How can I use these wilcards correctly?

<cfif ThisPart.Client_SKU EQ "%TR">Min. buy of 50pcs is required.</cfif>

Thanks.

Andy

    This topic has been closed for replies.
    Correct answer jamie61880

    Here's the answer:

    <cfif right(ThisPart.Client_SKU, 2) EQ "TR">Min. buy of 50pcs is required.</cfif>

    1 reply

    jamie61880AuthorCorrect answer
    Inspiring
    June 5, 2012

    Here's the answer:

    <cfif right(ThisPart.Client_SKU, 2) EQ "TR">Min. buy of 50pcs is required.</cfif>