Merge syntax for snippet name

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Apparently this doesn't work?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I was trying to save myself from creating and conditionally rendering a handful of pagetitle buttons... but it looks the name of snippet field doesn't process merge syntax?

Seems like it should!
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Skuid, can we make this an idea?
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Do you have a snippet that is titled every page title? We currently don't have any merge syntax there because we wanted it to only be used as a selection tool. We even toyed with only having it as a picklist but then thought some would have more.

Can you elaborate on this: "I was trying to save myself from creating and conditionally rendering a handful of pagetitle buttons..."?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
This page is a kind of record detail page, wherein I have a field called Interaction Purpose which is a picklist and serves kind of as a record type. I also have a ui-only formula field called NoteToGenerate which basically takes the spaces out of the Interaction Purpose field. In a static resource, I have a snippet for each Interaction Purpose which generates a standard Note for that type of interaction, based on a bunch of other values in the record.

If I could dynamically supply the name of the snippet to the button based on the NoteToGenerate field, I would only need one button to trigger whichever snippet was relevant. As it is, I need a different conditionally rendered button for each Interaction Purpose.