Hi Morten,

    #AOT
    str s;
    // ...

    ;
    s   = infolog.findNode(#BaseEnumsPath + '\\SalesType\\' + 'Sales').AOTgetProperties();
   
salesTable.SalesType =
str2int(substr(s,strscan(s,'#',strscan(s,'EnumValue ',1,9999) + 1,9999) + 1,9999));

The other solution :

//salesTable.SalesType = XXXXX(salesType, 'Sales' );
salesTable.SalesType = runbuf(strFmt('SalesType a(){return SalesType::%1;}','Sales'));

Regards,
Sonny Wibawa Adi

Morten Aasheim <[EMAIL PROTECTED]> wrote:
Hi all!



I want to set a table enum by using its name-value.



Ex.:



            SalesTable       salesTable;

            SalesType        salesType;

            ;



            salesTable.SalesType = XXXXX(salesType, 'Sales' );



(XXXXX = Unknown function.. )



I've tried using the str2enum, but that just works if I use the labelname..

The reason why I want to do this is because of an import-job uses the
name-values as the source values.





Regards,



Morten Aasheim

Systemkonsulent 

  _____ 





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


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
 
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to