"is" snippet not working? Handlebars JS and Dynamic Field

Hi all

I’m trying to implement the Handlebars JS below via a Dynamic Field, but I just get a blank cell.

Can anyone see where I’m going wrong?

{{#is field_83 "A"}} 
<a href="/dms/dashboard/lc1">
{{/is}}

{{#is field_83 "B"}} 
<a href="/dms/dashboard/fra">
{{/is}}

I’ve tried with no capitlisation and that doesn’t seem to be it.

Thanks for any suggestions.

Danny

It’s as though none of the statements are met, so it shows neither.

It’s not an issue with the html/link etc - I just need to conditonally show one code block or the other, but it’s showing neither for me.

There are several factors here, but one that might need to be looked at is case sensitive.

Can you try making the comparison lowercase?

{{#is (lowercase field_83) "lc1"}} 
<a href="/dms/dashboard/lc1">
{{/is}}

{{#is (lowercase field_83) "fra"}} 
<a href="/dms/dashboard/fra">
{{/is}}

Other factors can be based on what kind of field field_83 is?

Hi Moe

I just got in touch with Tim via chat, and we think it’s becuase the field is a dropdown/connected field. I had tried lower case, but maybe it’s both…!

I am just implementing a rule to use a text field - will report back shortly!
Cheers

Hi @moe

Yes so I’ve changed it to a text field and made it lower case, but nothing.

I’ve thrown the “else” in there as a fallback but nothing there either…

Danny

Are you seeing anything in thr console when the page loads? Does the link shownin the builder?

No link, nothing shows; not even the “else” block.

I see this error in the console.

3vendor-1670221438914.js:15 TypeError: Cannot read properties of undefined (reading 'inverse')
    at Object.<anonymous> (script-1714110514389.js:2:3435)
    at Object.c (vendor-1670221438914.js:66:23633)
    at Object.eval [as main] (eval at createFunctionContext (vendor-1670221438914.js:68:5639), <anonymous>:9:117)
    at c (vendor-1670221438914.js:66:19209)
    at d (vendor-1670221438914.js:66:19524)
    at e (vendor-1670221438914.js:67:26526)
    at r (script-1714110514389.js:45:9593)
    at q (script-1714110514389.js:45:5471)
    at n.$onChanges (script-1714110514389.js:46:7931)
    at vendor-1670221438914.js:14:16457
(anonymous) @ vendor-1670221438914.js:15

Can you send support the page with any login details necessary? Also, do you have any other custom javascript here? If yes, can you test this on a new page without any custom Javascript?

OK will do.

I am also noticing some table rules not doing their jobs, and I have a formula field in one particular table that just does not populate - until it does seemingly randomly.

I am still getting to know TB and doing a lot of adding, editing, deleting of all kinds of things at pace - no idea whether this couold have an effect. I know I confuse a lot of people by thinkning and talking too fast, so maybe a machine as well :joy:

No custom JS

Im pretty certain the issue here was due to the field being a connected field - If you use the rollup as discussed- would that work?

And ofcourse - make sure you’re displaying the “dependable” field as well as the “dynamic/dependent” field in the front end table - I dont think the dynamic field will pull the data if its not being displayed (you can always use “hide” class in the column to hide it