formlookup

Hello, friends

I need to retrieve values chosen in lookup and display them in other fields of the form. For example, based on following lookup configuration:

            sysTableLookup.addselectionfield(fieldNum(SalesLine, SalesId));
            sysTableLookup.addLookupfield(fieldNum(SalesLine, ItemId));
            sysTableLookup.addLookupfield(fieldNum(SalesLine, Name));
            sysTableLookup.addLookupMethod(tableMethodStr(SalesLine, mcrDisplayConfigId));
            sysTableLookup.addLookupMethod(tableMethodStr(SalesLine, mcrDisplayInventBatchId));
            sysTableLookup.addLookupfield(fieldNum(SalesLine, InventDimId));

user have chosen specific salesid with sepcific itemid and configid. Based on lookup fields .valueStr() I can only retrieve salesid.

I have heard that the solution could be usage of formlookup. It would be nice if you could provide me with an example on how to create one and how to integrate it in my main forms field.

Best regards,

Roberts

A lookup is normally used to help users to select a field value. For example, instead of typing a sales ID, I can pick one from a list. The result is exactly the same as typing in the ID manually.

You want something else, therefore a lookup may be a wrong solution for your requirements.

Based on your experience what would be the best solution in this situation. Main idea is that user can choose appropriate configuration based on query results in one field.

Best regards,

Roberts

and save the config parameters somewhere for later use.

If your goal is to choose a configuration, why you’re using a lookup for a sales order ID? That’s used when you want select a sales order, while you want something else.

I really didnt need the solution I previously described. Thanks!

Best regards,

Roberts