Thanks alot anitha, it has suited my requirement.
--- In Axapta-Knowledge-Village@yahoogroups.com, Anitha S <mail2eani...@...>
wrote:
>
> Hi,
>
> Chk if this suits ur requirement.
>
> QueryBuildDataSource qbds;
> QueryBuildRange qbr;
> str fieldEnum ;
>
> qbds = this.query().datasourcetable(TABLENAME);
> qbr = qbds.addrange(fieldnum(TABLENAME,FIELDNAME) ;// Assume this field
> is ENUM
>
> fieldEnum = FormStrContrl..valuestr(); // Get the value for the Enum field
> from form @ runtime
> qbr.value(fieldEnum); // Assign the runtime value
>
>
> hope this helps..
>
> Regards,
> Anitha
>
>
>
> On Tue, Nov 10, 2009 at 11:10 PM, giridharraj <giridhar...@...> wrote:
>
> >
> >
> > Hi,
> >
> > I would like to get the enum value which is actually in a string into query
> > build value dynamically.i.e.,for ex:
> > str value;
> > value = 'Delivered'
> > fieldName = 'Salesstatus'
> >
> > These are the values that i get during the process.I came to know that to
> > put enum values in querybuild value we need to write like this:
> >
> > queryBuildRange.value(strFmt('(ItemType == %1)',
> > any2int(ItemType::Service)));
> >
> > But in my case as I get the fieldname and value at runtime, i cannot write
> > like the above one. So, please suggest me a solution to assign enum value
> > dynamically into qbds and also to get enum type wrt the field name in a
> > table.
> >
> > Thanks and Regards,
> > Giridhar raj.
> >
> >
> >
>