Is it possible to show two tables column data on one column ......?

Hi ,

Is it possible to show two Tables data on one column…

Let us take example …

Form_C have field ID.

ID field have look up, getting look up from look up method on that field control ID.

In that look up method TableA is used

  • sysTableLookup.addLookupfield(fieldnum(TableA , ExtractProdId))

… Data is showing on ID field from TableA

Is it possible to show TableB data include TableA data on same column. I mean Form_C ID Field

Reply is appreciated

Thanks

Dear Kumar,

It is not possible to have multi table lookup using Lookup method.

There is a way to do so, just make a query, by query make a view and just use this view as datasource in a form and make this form your Lookup form.

For Example

Query : JMSLookupQuery

View : JMSLookupView

and Form which using this view as DS : WCL_JMSItemLookupForm

Code for Lookup Method is

"

Args args = new Args();

FormRun itemLookUp;

;

args.name(formstr(WCL_JMSItemLookupForm));

args.parm(Num2str(WCL_JointMeasurementLine.JMSRecID,0,0,0,0));

args.record(WCL_JointMeasurementHeader);

itemLookUp = new FormRun(args);

itemLookUp.init();

this.performFormLookup(itemLookUp);

"

Verify if Correct solution !!

Thanks

B K

You can display fields from several tables in a single lookup if you build it with SysMultiTableLoookup class.

Martin,

Requirement is , in lookup on one column data have to show from two different Tables column…

Dear shram ,

Thanks for fast reply,

My requirement is in look up one column have to show data from two different tables…

EG: Form_C have field ID

ID column have look up . That look up is getting form look up method

My requirement is ID column have to show data form two different Tables …

I mean Form_C ID column Data have to show form TableA and TableB

I was reacting to the statement that it is not possible to have multi table lookup using Lookup method.

If you want to concatenate two fields to one, my advice is: change your requirement. You have two fields, so show two fields. Otherwise you have to use some workaround, e.g. filling calculated values to a temporary table and showing the temporary table in the lookup form. A view with a calculated column is another option (AX 2012 only).

Martin/ sharam

Thanks for your valuable time …