Skip to main content

Notifications

Business Central forum
Suggested answer

Show table calculated field when page open with filtering allowed

Posted on by 2,252

Hi all

I have two calculated flow fields on Sales Line Table and function on the same table to calculate the sum of the two fields. I can create function on the table from sales line page and display the calculated column. Howver the problem is when a page displays a calculated column directly from invoking a function it does not allow filtering. Is there anyway to get the calculated table column (2 flow fields) and display the results in a page with filtering (filtering is filtering by specific values not related to drill down)

Table

Field (1; flow field 1)

Field(2;flow field 2)

field(3;FiledCalcValue)

{

Trgger OnValidate

GetCalcVale)

}

Procedure GetCalcValue

field 1+2

Page

Field(Rec.FiledCalcValue) - NOT WORKING

Field(Rec.GetCalcValue) -  WORKING but no filtering

Categories:
  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: Show table calculated field when page open with filtering allowed

    Hi Samantha73 

    Can you see your customized field that you have added in the Sales Order List page?

    if no then set Application Area= All for all customized fields in Sales Order List page.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • Samantha73 Profile Picture
    Samantha73 2,252 on at
    RE: Show table calculated field when page open with filtering allowed

    Thanks for the reply but I think I didn't explain 'FILTERING" properly. I don't see the below option on the page column when I add a field to a form that refers a function call directly. The function can be on the page or table. If I refer to a table field then it's fine

    filter.jpg

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: Show table calculated field when page open with filtering allowed

    Hi,

    You have to add trigger OnOpenPage of Sales Document.

    For Example

    trigger OnOpenPage

    Begin

    Rec.Setrange(FieldName, Filter) // Added the filter whatever is your condition.

    ENd;

    Also one more thing to note do you want to filter the document on opening of list page or Card page based on that you have to add OnOpenPage trigger.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans