Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Passing criteria to customSQL

    Hi,

    I am trying to pass a dynamic value to a variable say test_id which will be passed on by the view as supplied by the user in cutomSQL tag as:
    <customSQL>
    Select a.a_id
    where a.a_name = $criteria.name;
    </customSQL>

    setting criteria for the list which is associated with the ds above:
    final Criteria criteria = new Criteria();
    criteria.addCriteria(name, "test");
    list.setCriteria(criteria);

    Any idea about the same that how can we pass values supplied to the criteria in the custom SQL tag or any other alternates?

    #2
    We're not following what the question is. If you put something in the data of a DSRequest (which would be the criteria, for a fetch) you can indeed access it from customSQL in the way you've shown.

    Comment

    Working...
    X