[Gambas-user] Display only some fields in data View
rocko
sunblaster5 at ...626...
Wed Sep 5 20:38:56 CEST 2012
On Tue, 2012-09-04 at 11:46 -0700, rocko wrote:
> I have a table with several fields but I only want certain fields
> to be displayed in a dataviewer.
> Not sure on how to do this.
> So far i only have this, which isn't much.
>
> Dim sView As Result
> Dim ID As Integer
>
> sView = DB.Find("inventory ", id &1, ID)
> For Each sView
> If sView!daysLeft < 22
> 'put the name and days left in the name and daysleft field of the
> dataview
> Next
>
I have 5 fields in a table but I only need to display 3 of them and only
when the 'daysLeft' field is less the 21.
This is some pseudo code:
sView = DB.Find("inventory", id = &1, ID)
For Each sView
If sView!daysLeft < 22
DataView1.name = sView!name
DataView1.location = sView!location
DataView1.daysLeft = sView!daysLeft
Endif
--
rocko <sunblaster5 at ...626...>
More information about the User
mailing list