Highlight VCH Rate Field if the value does not match with Price List Rate

Discussion in 'Requests' started by Suyash Narnolia, Nov 26, 2023.

    
  1. Suyash Narnolia

    Suyash Narnolia New Member


    Hello Everyone

    Need help figuring out why this code is highlighting the field even when the field value is same as price level Rate.
    Code:
    [#Field: VCH Rate]
        Option        : Rate Mismatch From PL Rate    : (NOT $$IsEmpty:@@PriceLevelRate AND $$Value != @@PriceLevelRate)
     
        [!Field    : Rate Mismatch From PL Rate]
            Background    : Petal Pink
            Border        : Highlight Border
    
            [Border: Highlight Border]
                Top         : Thick
                Bottom      : Thick
                Color        : "Petal Pink"
    First Screen Shot shows the output of the code. Please note the VCH Rate Field is highlighted in pink which is not intended as the applicable Price List rate is same as the Rate in VCH Rate field (See ScreenShot 2).
    Screenshot 2023-11-26 170137.png

    Screenshot 2023-11-26 170244.png
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You have given 2 conditions ---- Price level is NOT empty and even though rate is same the second condition also applies.
     


  3. Suyash Narnolia

    Suyash Narnolia New Member


    Thankyou Amit Sir for your response.

    The first condition $$IsEmpty: $$PriceLevelRate checks if there is an applicable price list value. The second statement checks if the value is equal to the field value.

    So If an Applicable Price list value exists AND this value is not equal to the value in the field , Only then the Option Definition will be applicable and the field should be highlighted to warn the user.

    The intention is to not to highlight the field in case any applicable value in the pricelist doesn't exists anyways. The second condition can be considered a subset of the first condition.

    Also, since AND is used, both the condition need to satisfy for the attributes in the optional definition to be applied. So it should never apply if the field value is equal to the Price List Rate.

    So I don't see anything wrong here. Am I missing anything sir? Please help.
     


Share This Page