Tes Value of Merge Field

6 posts, 0 answers
  1. LEVEFAUDE
    LEVEFAUDE avatar
    39 posts
    Member since:
    Apr 2011

    Posted 07 Jan 2013 Link to this post

    Hello

    Can someone tell me if it's possible to do this

    If <<MergeFileld1>> = 'Test 1' then
       Show this section or Paragrah
    Else
       Show this section or Paragrah

    Thank you a lot and have a good programmatic Year 2013

    Anne

  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 09 Jan 2013 Link to this post

    Hi Anne,

    Genuine conditional fields are in our development plans, but have not been implemented yet.

    However, it is possible to implement a custom field that will behave in a similar way using the TextBeforeIfNotEmpty and TextAfterIfNotEmpty properties of MergeFields. By default they are not added if the field value is empty string. In the attached sample implementation they are added if the value is not 0. Please find the project attached.

    Let us know if you need additional assistance.

    Greetings,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. LEVEFAUDE
    LEVEFAUDE avatar
    39 posts
    Member since:
    Apr 2011

    Posted 18 Jan 2013 Link to this post

    Hi Petya,

    Could you send me a VB.NET version of your project ? I don't manage to convert it via your Code Converter.

    Thank you,

    Anne
  5. Petya
    Admin
    Petya avatar
    975 posts

    Posted 18 Jan 2013 Link to this post

    Hello Anne,

    Please find the project converted to VB.NET as you requested.
     
    Greetings,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. LEVEFAUDE
    LEVEFAUDE avatar
    39 posts
    Member since:
    Apr 2011

    Posted 30 Jan 2013 Link to this post

    Thank you the solution you provided to us work well.

    Could you tell me how to keep carriage returns within TextAfterIfNotEmpty.

    For instance :

    {CUSTOMIFMERGEFIELD ForSou \b False \f "text :
     line1
    line 2
    line 3"}

    When i merge the document i get this : text : line1line 2line 3

    When i change Display mode to FieldDisplayMode.Code; i get :
    {CUSTOMIFMERGEFIELD ForSou \b False \f "text : line1line 2line 3"}
    It delete carriage return & line feed

    Thank you for your help,

    Anne.
  7. Petya
    Admin
    Petya avatar
    975 posts

    Posted 04 Feb 2013 Link to this post

    Hello Anne,

    Unfortunately, the result you are trying to achieve is not possible with the current implementation. We have had similar requests in the past, however the feature has not been scheduled yet and I cannot tell if and when it will be implemented.

    Let us know if you have other comments or questions.

    Kind regards,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner