locked
Hiding text in textbox? RRS feed

  • Question

  • I have textboxes that have numerous values inside each, such as "Apple, Banana, and Orange" in one textbox. Is it possible to hide certain parts of the cell if it is not apple, banana, or orange? Like if Blueberry is in one of the cells, just make hide said value?

    I tried using this code, but it did not work.

    =IIF(Fields!Fruit.Value = "Blueberry", "", Fields!Fruit.Value)

    So instead of the textbox being Apple, Banana, Orange, Blueberry, it'd be Apple, Banana, Orange

    Thanks!




    • Edited by Lanmanna Thursday, June 15, 2017 8:14 PM
    Thursday, June 15, 2017 6:25 PM

Answers

  • Hello,

    For this you can use the REPLACE function to remove parts of the string, example:

    =REPLACE(Fields!Fruit.Value, "Blueberry", "")


    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    • Proposed as answer by Henry Jiang Friday, June 16, 2017 7:53 AM
    • Edited by Olaf HelperMVP Friday, June 16, 2017 8:50 AM
    • Marked as answer by Lanmanna Friday, June 16, 2017 1:18 PM
    Friday, June 16, 2017 6:08 AM

All replies

  • Hello,

    For this you can use the REPLACE function to remove parts of the string, example:

    =REPLACE(Fields!Fruit.Value, "Blueberry", "")


    Olaf Helper

    [ Blog] [ Xing] [ MVP]


    • Proposed as answer by Henry Jiang Friday, June 16, 2017 7:53 AM
    • Edited by Olaf HelperMVP Friday, June 16, 2017 8:50 AM
    • Marked as answer by Lanmanna Friday, June 16, 2017 1:18 PM
    Friday, June 16, 2017 6:08 AM
  • Works perfect! Thanks!
    Friday, June 16, 2017 1:18 PM