Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table, modifiedField method and array field.

505 views
Skip to first unread message

arnam

unread,
Feb 9, 2010, 3:16:29 AM2/9/10
to
Hi,

I'm trying to validate array field in modifiedField method of the
table. The problem is that i don't know how to catch modifications of
one of the array values, not the whole array field.


<code>
public void modifiedField(fieldId _fieldId)
{
int i;
;

super(_fieldId);

switch (_fieldId)
{
case fieldnum(CustInvoiceLine, Dimension): //this catches
modifications of whole field, but this line is never executed when you
modify one of the values of the array
...
}

</code>

Any ideas?

Regards
arnam

arnam

unread,
Feb 9, 2010, 3:33:17 AM2/9/10
to

Martin Dráb

unread,
Feb 9, 2010, 3:43:47 AM2/9/10
to
Hi,

you have to use the fieldId2Ext() method.

An example:

case(fieldId2Ext(
fieldnum(CustInvoiceLine, Dimension),
Dimensions::code2ArrayIdx(SysDimension::Department))):
--
Best regards,
Martin Drab (Czech Blog: http://dax-cz.blogspot.com)

Santosh.R

unread,
Feb 9, 2010, 3:49:47 AM2/9/10
to

Hi,

You can try to implement/workAround with the following code in
modified field to achieve the expected result.

static void FindDimensionArrayName(Args _args)
{
sysDictField sysDictField;
int _array;
;

sysDictField = new sysDictField(tablenum(SalesTable),
fieldnum(SalesTable, Dimension));

for (_array = 1; _array <= sysDictField.arraySize(); _array++)
{
info(strfmt("Dimension value is %2: %1",
sysDictField.label(_array), sysDictField.name(DbBackend::Sql, _array,
FieldNameGenerationMode::FieldList, tablestr(SalesTable))));
}
}

In case any other queries please feel to revert back.

Thanks
Santosh.R

Ani

unread,
Feb 9, 2010, 4:31:32 AM2/9/10
to
Hi,

Try this:

case fieldid2ext(fieldnum(CustInvoiceLine,Dimension),2):
info("Hi");
break;


Hope it helps!!!

Regards,
Anitha

On Feb 9, 1:16 pm, arnam <arn...@gmail.com> wrote:

arnam

unread,
Feb 9, 2010, 4:36:23 AM2/9/10
to
Thank you all for your help.

Yours sincerely,
arnam

0 new messages