Merging data field into script

  • 1
  • Question
  • Updated 1 year ago
  • In Progress
  • (Edited)

I am merging a field into a script. 



{{Video_Unique_Id__c}} is
equal to w4rx51kbzw

Three scenarios.  The first 2 work the third does not

Scenario 1

<script src="https://fast.wistia.com/embed/medias/w4rx51kbzw.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js"; async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_w4rx51kbzw seo=false videoFoam=true email=a29f1000001zKEFAA2" style="height:100%;width:100%">&nbsp;</div></div></div>]

 

 Scenario 2

<script src="https://fast.wistia.com/embed/medias/{{Video_Unique_Id__c}}.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js"; async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_w4rx51kbzw seo=false videoFoam=true email=a29f1000001zKEFAA2" style="height:100%;width:100%">&nbsp;</div></div></div>

 

 Scenario 3 (fails when I try to merge the {{Video_Unique_Id__c}} in the second to last field

<script src="https://fast.wistia.com/embed/medias/{{Video_Unique_Id__c}}.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js"; async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_{{Video_Unique_Id__c}} seo=false videoFoam=true email=a29f1000001zKEFAA2" style="height:100%;width:100%">&nbsp;</div></div></div>


Here is what happens on the third.

https://drive.google.com/file/d/0BzBJWINUVfkvbEVYNXQ1ZElrOW8/view
Photo of Bill Fox

Bill Fox

  • 7,904 Points 5k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Bill,

I think you are using the Template component for these merges.  If so, make sure that you have set a Model for the component.  If you do not set a Model, Skuid has no way to determine what data to merge into your {{Video_Unique_Id__c}} field.

The second thing I recommend is to use the triple mustache to reference you 'id' field:

{{{Video_Unique_Id__c}}}

Since you are trying to build an html link, you don't want Skuid to accidentally apply any other formatting to the 'id'.  You just want the 'raw' value.

Thanks,

Bill