Product Development

Get Involved. Join the Conversation.

Topic

    Wim Bos
    How to prevent item description containing carriage return?
    Topic posted August 2, 2019 by Wim BosBronze Medal: 1,250+ Points 
    45 Views, 2 Comments
    Title:
    How to prevent item description containing carriage return?
    Summary:
    Need to prevent end user from creating new items (or updating existing items) with item description containing a carriage return (easily happens when using copy/paste from another application/source)
    Content:

    Trying to get the "prevent item description containing carriage return" requirement working using a 'Validation' item rule, where the Product Management implementation manual (https://docs.oracle.com/en/cloud/saas/supply-chain-management/19c/faipr/defining-product-rules.html#FAIPR1237667) mentioned string functions contains() and match() seem most likely candidates to somehow be able to do the job.

    We've been using several item rules successfully, but even after several hours of playing around with string functions contains() and match() we seem to be struggling to get this requirement working. For example below rule setup seems to always raise an error (with or with carriage return present in the item description):
    * IF Expression: [Item].[Item Basic].[Organization Code] == "IM"
    * Validation Condition: contains("\\r"; [Item].[Main].[Item Description])
    * User message: Carriage return not allowed in item description

    Requesting 'guru' guidance in how to correctly achieve preventing carriage return in item description
    Many thankx in advance!

    Version:
    19B
    Image:
    Document:

    Comment

     

    • Magesh Kesavapillai

      contains[“\r”, {attribute_to_check}] should work. But you should add this in IF expression and populate false in validation condition.

      If it does not work, pls raise a SR for investigation.

      • Wim Bos

        Updated rule setup accordingly does not seem to do the job (get no rejection at all):

        • IF Expression: contains("\\r"; [Item].[Main].[Item Description]) 
        • Validation Condition: false 
        • User message: Carriage return not allowed in item description 

         

        => Created SR 3-20741859531 to take this further