bpj
January 30, 2021, 10:38am
2
Server-side you should be able to do something like
old_code.default('')
But client-side blank (not null) doesn't trigger the default so you would need the ternary there:
Is the data binding default function meant to work the same for both SC (in my case PHP) and client-side?
I’m finding that the behaviour for empty strings (not NULL) is different:
Server Connect treats an empty string as something that would trigger the default value however, client-side formatter seems to leave it as an empty string.
e.g. imagine a SC returns two values
firstname = 'John'
preferredname = 'Johnny'
I use
preferredname.default(firstname)
to show the preferred name if presen…