I am using PDM_LIST in the following manner:
<PDM_LIST PREFIX=ci WHERE="id > 0" FACTORY=loc>
Now according to the condition given, it will always fetch all the records from the database. Due to this, my page has gone slow.
I am accesing the selected site in a variable as shown:
Now my concern is that I want to change the condition in the PDM_LIST to fetch only those records, where the site id is equal to the value stored in the site_value variable. I want to change the condition WHERE="id > 0" to something like WHERE="site = site_value". Please tell me the syntax for this.
if your zsitelookup value is known before page loads, you can use this whereclause:
<PDM_LIST PREFIX=ci WHERE="site='$args.zsitelookup'" FACTORY=loc>
It is giving parsing error in wsp session.
What's type of your field? SREL to site table?
Checked, site is external key is integer, this should work:
<PDM_LIST PREFIX=ci WHERE="site=$args.zsitelookup" FACTORY=loc>
Or to avoid error you can use:
<PDM_IF "$args.zsitelookup" != "">
<PDM_LIST PREFIX=ci WHERE="id is not NULL" FACTORY=loc>
I think the only way to get, by user input filtered, object list is to use REST API