DataView: Conditional template code


I think I have seen in one of the demo’s a solution where you can have some conditional code for the templates within a dataview… maybe the ability to call a JS function which then contains that item’s data?

The idea being if I could:

  1. Check if a certain field i.e. obj.status was equal to “online”, then show another field/text
    in the template?

  2. Trigger a sub-read of data… now this maybe the wrong way to approach this, however I
    am trying to do something where if a field contains a certain value, we can say call an
    external JS function to populate a dropdown in the dataview template?

Not sure if any/all of the above is possible??

Any ideas/thoughts would be welcome.



Yes, you may use function as a template: