Re: [Axapta-Knowledge-Village] query for the fields of a table

2005-01-18 Thread Markus Turunen

Yeah, now it's working.
 
Thanks!

Raul Llorente Peña/OPENSOLUTIONS wrote:

> Have a look over the dictTable class:
>  
> dictTable   dt;
> int numberOfFields;
> int fieldId;
> int i;
> ;
> dt = new dictTable(tableNum(CustTable));
> //name of table
> info(dt.name());
> numberOfFields = dt.fieldCnt();
> info(int2str(numberOfFields));
> for (i = 1; i <= numberOfFields; i++) //if you want All fields but 
> not the system ones, then use i <= (numberOfFields - 12)
> {
> fieldId = dt.fieldCnt2Id(i);
> info(dt.name()+'.'+dt.fieldName(fieldId));
> }
>  
> Be careful with array fields, like dimension. To manipulate and 
> traverse them, you will have to use dictfield, but it has a similar 
> interface. I hope this helped you.
> Raúl Llorente Peña
>
> Análisis, Desarrollo e Implementación en
> Microsoft Bussiness Solutions-Axapta
> OPEN SOLUTIONS
>
> -"mqturune" <[EMAIL PROTECTED]> escribió: -
>
> Para: Axapta-Knowledge-Village@yahoogroups.com
>     De: "mqturune" <[EMAIL PROTECTED]>
> Fecha: 18/01/2005 08:04
> Asunto: [Axapta-Knowledge-Village] query for the fields of a table
>
>
> Hi all,
>
> What would be the easiest way to loop all the fieldnames
> of a table? For example I'm using Address-table
> and I want to add all the fieldnames to a listbox in a form.
>
> I'm really meaning the fieldnames, not values of
> a certain record.
>
> /Markus
>
>
>
>
>
>  Yahoo! Groups Sponsor
>
>
> Sharing the knowledge on Axapta.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
> Sharing the knowledge on Axapta.
>
>
> 
> *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]
>   <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>   Service <http://docs.yahoo.com/info/terms/>.
>
>



 Yahoo! Groups Sponsor ~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/kGEolB/TM
~-> 

Sharing the knowledge on Axapta. 
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/
 





Re: [Axapta-Knowledge-Village] query for the fields of a table

2005-01-17 Thread Raul Llorente Peña/OPENSOLUTIONS





Have a look over the dictTable class: dictTable   dt;    int numberOfFields;    int fieldId;    int i;    ;    dt = new dictTable(tableNum(CustTable));    //name of table    info(dt.name());    numberOfFields = dt.fieldCnt();    info(int2str(numberOfFields));    for (i = 1; i <= numberOfFields; i++) //if you want All fields but not the system ones, then use i <= (numberOfFields - 12)    {    fieldId = dt.fieldCnt2Id(i);    info(dt.name()+'.'+dt.fieldName(fieldId));    } Be careful with array fields, like dimension. To manipulate and traverse them, you will have to use dictfield, but it has a similar interface. I hope this helped you.Raúl Llorente Peña Análisis, Desarrollo e Implementación en Microsoft Bussiness Solutions-AxaptaOPEN SOLUTIONS-"mqturune" <[EMAIL PROTECTED]> escribió: -Para: Axapta-Knowledge-Village@yahoogroups.comDe: "mqturune" <[EMAIL PROTECTED]>Fecha: 18/01/2005 08:04Asunto: [Axapta-Knowledge-Village] query for the fields of a tableHi all,What would be the easiest way to loop all the fieldnames of a table? For example I'm using Address-tableand I want to add all the fieldnames to a listbox in a form.I'm really meaning the fieldnames, not values ofa certain record./Markus Yahoo! Groups Sponsor ~--> In low income neighborhoods, 84% do not own computers.At Network for Good, help bridge the Digital Divide!http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/kGEolB/TM~-> Sharing the knowledge on Axapta. 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/


Sharing the knowledge on Axapta.








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 the Yahoo! Terms of Service.













[Axapta-Knowledge-Village] query for the fields of a table

2005-01-17 Thread mqturune


Hi all,

What would be the easiest way to loop all the fieldnames 
of a table? For example I'm using Address-table
and I want to add all the fieldnames to a listbox in a form.

I'm really meaning the fieldnames, not values of
a certain record.

/Markus





 Yahoo! Groups Sponsor ~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/kGEolB/TM
~-> 

Sharing the knowledge on Axapta. 
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/