Announcement

Collapse
No announcement yet.

Placeholders parsed with handlebars in text/Wysiwyg field values?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Placeholders parsed with handlebars in text/Wysiwyg field values?

    I'm wondering if anyone's done anything with having field values displayed with placeholders being parsed/rendered with their resultant values? Whereas in edit mode, the original placeholder tags are visible?

    i.e. when showing the detail of a record, if a text field value includes {{account.name}} , the value of the name of field of the related account is displayed?

  • #2
    You might be able to do this using a foreign field in the entity editor with a text field acting as the template and a calculated field combining the 2 using replace:


    Comment


    • #3
      Hello, I am not sure if I understand your request correctly, but I am using this:
      Code:
      $pocetDnuKonecEtapyInt = datetime\diff(aktualEtapaKoniec, datetime\today(), 'days');
      
      $upozorneniZelena = string\replace('<font color="#000000" style="background-color: rgb(109, 207, 74);">&nbsp;Do konce etapy: {dny} dní&nbsp;</font>', '{dny}', $pocetDnuKonecEtapyString);
      
      ifThen(
          $pocetDnuKonecEtapyInt > 10,
          upozorneniZakazka = $upozorneniZelena
          );​
      It basically replaces placeholder {dny} with the value calculated in variable $pocetDnuKonecEtapyInt (string\replace() is perfect for this) syntax is string\replace(STRING, PLACEHOLDER, NEW_VALUE).
      Hope it helps.

      Comment


      • #4
        As far as I'm aware it is not possible! Then again perhaps Jakub coding may work.

        It is possible in PDF-Template only but you need to see how it is done to make it possible everywhere.

        Using formula doesn't work, or perhaps there is some workaround that make it possible but I never seen an example.

        String Replace won't work because murray may have read your question incorrectly.

        Anyway I think I once ask for this feature request somewhere but don't know which pages it is on at the moment...

        Comment

        Working...
        X