Database Publishing and Rows

I have a shared database template that is used by many content types. I want to be able to adjust what columns are published based on a binding (value determined by the content type).

For some content types I want a value published to the $row.STATE column, for other content types I don’t want Rhythmyx publishing anything to the $row.STATE column (because the value of that column is coming from another application).

I have not been able to figure out how to sometimes publish $row.STATE. Has anyone done this before, or know how?

Tim,

The first thing I would try would be a JEXL if…else function in the binding. That seems to be the simplest approach. This function has been available since we upgraded to JEXL 1.1 in Rhythmyx Version 6.5.

The rffDsEIGenericSelector Template in FastForward demonstrates the use of this function.

RLJII

i appreciate the response, I need to clarify my request - I don’t want an IF statement to determine the value of my binding, I want an IF statement to determine if the binding should be created.

So for certain content types I don’t want the variable $row.STATE set. Setting it to empty, or null, will overwrite what’s in the database, so I don’t want it set at all (and I’m trying to avoid creating two templates with the only difference being this binding being set).

Tim
Did you find the resolution to the problem.
We are experiencing similar issues where we have to dynamically build the binding if conditions are met or build an array of bindings with incremental count.

Appreciate your help.

Mike

I don’t see any way to do this with a single template.