Unable to view data in New Form

Hi DAX Community,

I am trying to create a new Custom Sales Order Enquiry form, which must have 2 filters FromDateTime and ToDateTime. This filter must run on the SalesTable.createdDateTime field and retrieve the records from SalesTable.

May I know how can i achieve this?

What steps I took:'

I created the form, create the 2 filters, Created A new table TestTable with 3 fields: SalesId, Sales Name and Created Date Time and this TestTable is being used as a DataSource in the New Sales Order enquiry form.

I can see that the data is being inserted in TestTable but not refecting in the form's grid.

To try fixing this, i tried TestTable_ds.research(true); in the form after the insertion took place - But this didn't fetch me any expected outputs.

Parents Reply
  • Hi Martin,

    I was able to achieve desirect non-duplicates in a view.

    Now I would like to add a calculated column to this view which Sums all the Line amounts for the Item ID = 'Service'.

    I tried the same for line amount(Service + non-service), the calculated column is fetching right values. Query for this is

    private static server str calcLineAmount2()
    {
    str expression;

    expression = 'select sum(SalesQty) from salesLine where salesLine.SalesId = '+

    SysComputedColumn::returnField(tableStr(MyView),
    identifierStr(SalesLine),
    fieldStr(SalesLine, SalesId));

    return expression;
    }

    Now i try adding a filter on ItemId, it gives an error: (where am i going wrong here)

    private static server str calcLineAmount2()
    {
    str expression;

    expression = 'select sum(SalesQty) from salesLine where salesLine.ItemId = '+"Service"+' AND salesLine.SalesId = '+

    SysComputedColumn::returnField(tableStr(MyView),
    identifierStr(SalesLine),
    fieldStr(SalesLine, SalesId));

    return expression;
    }

Children
Related
Recommended