You should use a combo box control with the appropriate enumerated type to 
allow you to change the view dynamically. This is the standard in Axapta and 
you may look at an example in General Ledger -> Journals -> General Journal. 
You should also call the executeQuery method from the modified method of the 
combo box control. This will update the query with the appropriate filter each 
time the value of the combo is changed.
   
   
  Varden Morris
  Senior Developer
  WellPoint Systems Inc.
  Microsoft Gold Certified Partner
Suite 2000, 500 - 4th Ave SW
Calgary, Alberta, Canada 
T2P 2V6
   
  (403) 444-5848 direct
  (403) 444-3900 main
  (403) 615-1604 cell
  www.wellpoint.ca
   
  
jaykay_nl <[EMAIL PROTECTED]> wrote:
  Hi Anil,

Thanks for the very useful information. It is only a pity it needs to 
be programmed. But it works!

Is it also possible to activate at the same time the "Remove Filter" 
button, so it is possible to remove the filter with just one click.

Thanks in advance,
JayKay.

--- In Axapta-Knowledge-Village@yahoogroups.com, ANIL OZAY 
<[EMAIL PROTECTED]> wrote:
>
> Hi JayKay,
> 
> We use range objects to filter records on datasources. You can 
filter
> datasources of tables and reports. But you must do it after the
> initialization of datasource.
> 
> In forms, the initialization of datasource done after the 'super()' 
of
> init() method of form. 
> 
> So you can add this code in the init() method of datasource, after 
the
> 'super();'
> 
> SalesTable_ds.query().dataSourceTable(tablenum(SalesTable)).addRange
(field
> num(SalesTable,SalesStatus)).value(enum2str
(SalesStatus::Backorder));
> 
> 
> In this code, firstly you selected SalesTable datasource, after you 
select
> the SalesStatus field to filter. Filter values must be string, so 
you must
> change the enum value to string. Enum2str(...) can do for you.
> 
> Regards,
> 
> Anil Ozay
> Software Engineer / Axapta Specialist
> MBSCP (Server, Programming), MCP
> 
> Anadolu Group,ABH
> 
> 
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of 
jaykay_nl
> Sent: Friday, January 20, 2006 1:06 AM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: [Axapta-Knowledge-Village] Open form with a specific filter
> 
> Hi All,
> 
> I would like to open for example the sales table form and by 
default 
> see only the sales orders with status "Open" instead of all orders 
> which is currenty the case.
> 
> So, is there a way to open a form with a specific filter active.
> 
> Thanks,
> JayKay
> 
> 
> 
> 
> 
> Sharing the knowledge on Axapta.
> Visit www.frappr.com/axapta for axapta friends. 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> Bu e-posta ve muhtemel eklerinde verilen bilgiler kisiye ozel ve 
gizlidir. Anadolu Bilisim Hizmetleri A.S. bu mesajin icerigi ve 
ekleri ile ilgili hicbir hukuki sorumluluk kabul etmez. Yetkili 
alicilardan degilseniz, bu mesajin herhangi bir sekilde ifsa 
edilmesi, kullanilmasi, kopyalanmasi, yayilmasi veya mesajda yer alan 
hususlarla ilgili olarak herhangi bir islem yapilmasi kesinlikle 
yasaktir. Bu durumda hemen mesajin gondericisini bilgilendiriniz ve 
mesaji sisteminizden siliniz. Elektronik mesajlar uzerinde yapilmis 
herhangi bir degisiklik veya sonuclari uzerinde Anadolu Bilisim 
Hizmetleri A.S.'nin sorumlulugu yoktur. Ayrica, e-posta 
mesajlarindaki hata ve/veya eksiklikten, virus icermesinden ve 
bilgisayar sisteminize verebilecegi herhangi bir zarardan Sirket 
olarak sorumluluk kabul etmeyecegimizi de bildiririz.
> 
> This e-mail and any information included within any attached 
document are private and confidential and intended solely for the 
addressee. Anadolu Bilisim Hizmetleri A.S. does not accept any legal 
responsibility for the contents of this message and any attached 
documents. If you are not the intended addressee, it is forbidden to 
disclose, use, copy, or forward any information within the message or 
engage in any activity regarding the contents of this message. In 
such case please notify the sender and delete the message from your 
system immediately. Anadolu Bilisim Hizmetleri A.S. also denounces 
any legal responsibility for any amendments made on the electronic 
message and the outcome of these amendments, as well as any error 
and/or defect, virus content and any damage that may be given to your 
system.
>







Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 



  SPONSORED LINKS 
        Business finance course   Business to business finance   Small business 
finance     Business finance consultant   Business finance magazine   Business 
finance schools 
    
---------------------------------
  YAHOO! GROUPS LINKS 

    
    Visit your group "Axapta-Knowledge-Village" on the web.
    
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

    
---------------------------------
  

  


                
---------------------------------
 
 What are the most popular cars?  Find out at Yahoo! Autos

[Non-text portions of this message have been removed]



Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to