Using 4D Server v.2003, A4D 3.0 using 4D web server via WebSTAR V, I have a page with the following code:
<% create empty set([Airports];"useairports")
QUERY([AircraftAirportLink]; [AircraftAirportLink]PublicationRecordNumber=num($recnum))
for ($i;1;records in selection([AircraftAirportLink]))
query([Airports]; [Airports]RecordNumber=[AircraftAirportLink]AirportRecordNumber)
add to set([Airports];"useairports")
next record([AircraftAirportLink])
end for %>
<% =records in set("useairports") %>
<% use set("useairports") %>
<% =records in set("useairports") %>
<% =records in selection([Airports]) %>
<% for ($j;1;records in selection([Airports]))
goto selected record([Airports];$j)
etc etc
What I find is that "records in set("useairports")" is quite correctly calculated, and displays correctly both times it is called up on the page. However, "records in selection([Airports])" stays stubbornly at zero, despite the "use set" instruction.
If I put this into a 4D method it all works fine, so I'm stumped. I checked the A4D docs but can't see many references to the use of Sets, so have assumed that the syntax I'm using is allowable.
I'm stumped as well. A quick test here using a similar technique shows it works. What happens if you make a wrapper for 'use set' like this:
`WEB_UseSet(inSet) USE SET($1)
Then replace 'use set' with WEB_UseSet. It is possible that there is a bug in the plugin API version of USE SET.
Regards,
Aparajita Victory-Heart Productions [EMAIL PROTECTED] www.aparajitaworld.com
"If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoylibrary.com
