mibuso.com

Microsoft Business Solutions online community
It is currently Mon May 20, 2013 9:38 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Solved] Filter op keuze veld
PostPosted: Thu Aug 23, 2012 2:20 pm 
Offline

Joined: Mon Jun 22, 2009 7:06 pm
Posts: 77
Country: Netherlands (nl)
Is het mogelijk om op een keuze veld (de keuze zijn goed, fout en exit) een filter te zetten? Ik wil namelijk in een report een filter kunnen zetten op het veld waarbij het veld nog leeg is. Ik krijg dit niet voormekaar. Hij zegt steeds dat het goed, fout of exit moet zijn. Het mag trouwens ook het laatste record zijn als dat wel werkend te krijgen is.


Last edited by Red-Eagle on Mon Aug 27, 2012 12:55 pm, edited 1 time in total.

Top
 Profile E-mail  
 
 Post subject: Re: Filter op keuze veld
PostPosted: Thu Aug 23, 2012 5:18 pm 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
Als je daarmee een option-field bedoeld, dan heb je een probleem: Je default-value is "Goed" (intern is dit een 0).
Als je ook een blank waarde wilt hebben, moet je de options " ,Goed,Fout,Exit" gebruiken (let op de blank juist voor de comma!)
Dan kan je ook filteren op blank waarden. (Goed heeft dan intern waarde 1 e Blank heeft intern waarde 0).

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject: Re: Filter op keuze veld
PostPosted: Fri Aug 24, 2012 8:37 am 
Offline

Joined: Mon Jun 22, 2009 7:06 pm
Posts: 77
Country: Netherlands (nl)
Op een form kan ik gewoon filteren op lege cellen en hij geeft ook aan dat options " ,Goed,Fout,Exit" te gebruiken zijn. Toch krijg ik het niet voor mekaar. Ik kan niet in de desgin mode van de tabel helaas.

IK heb nu

Inspection.SETFILTER("Inspection Result", 'Goed');

dit geeft wel resultaat dat de lege cellen niet komen, maar verder niks.

Enig idee verder?


Top
 Profile E-mail  
 
 Post subject: Re: Filter op keuze veld
PostPosted: Fri Aug 24, 2012 5:39 pm 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
Eerst en vooral dit: gebruik dit NOOIT!

Quote:
Inspection.SETFILTER("Inspection Result", 'Goed');


Als je ENU (of een andere taal) gebruikt werkt dit niet meer.
Gebruik:
Code: Select all
Inspection.SETRANGE("Inspection Result",Inspection."Inspection Result"::Goed);

of ook dit is ok:
Code: Select all
Inspection.SETRANGE("Inspection Result",'%1',Inspection."Inspection Result"::Goed);


In code kun je dit proberen:
Code: Select all
Inspection.SETRANGE("Inspection Result",Inspection."Inspection Result"::" ");


In de form kun de waarde '' gebruiken (2 keer een single quote). En als de " " waarde de eerste in de lijst is, kun je ook 0 gebruiken om te filteren. (intern worden options als (small-)integers opgeslagen.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject: Re: Filter op keuze veld
PostPosted: Mon Aug 27, 2012 12:55 pm 
Offline

Joined: Mon Jun 22, 2009 7:06 pm
Posts: 77
Country: Netherlands (nl)
Bedankt voor de hulp. Het werkt!


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: