Hi all,

I'm having a little problem...

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]AirportReco rdNumber)
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 bet it's something really obvious to someone less stupid.

David Wright
Stansted News Limited

134 South Street, Bishop's Stortford, Herts CM23 3BQ, UK
Tel: 01279 714500




Reply via email to