NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Devan on October 25, 2011, 08:42:10 PM

Title: Drop downs - defaulting to LAST item on list?
Post by: Devan on October 25, 2011, 08:42:10 PM
Hi all,

I was wondering, on a NetWebForm, when you have a 'drop down' field that is populated from an external file, is there an easy way to get the display to default show the LAST item in the file, not the first?

Reason being is that I am using some drop downs to gather information for a report filter, so I am wanting to do 'first/last' drop down selectors, with the 'first' selector showing the first item in the file and the 'last' selector showing the last item in the file.

Thanks!
Devan
Title: Re: Drop downs - defaulting to LAST item on list?
Post by: Bruce on October 25, 2011, 11:29:51 PM
Hi Devan,

I guess the approach I'd take is by "priming" the two fields, one with the first value in the file, the other with the last value in the file.
ie by "priming" the actual fields, it'll "go there" in the drop list.

start on the priming tab, but you may need to add some embed code to open the file, read the last record, and so on (in the place where the priming occurs.)

cheers
Bruce

Title: Re: Drop downs - defaulting to LAST item on list?
Post by: Thys on October 25, 2011, 11:33:22 PM
Hi Devan,

There are priming options on a webform for both inserts and changes. It has a Set Field value where you name the use variable that is displayed on the form. Then there is a To Value value that the variable is primed with. Here you can add either a fixed value for the use variable or you can reference a procedure or class method which returns the required value.

Thys