Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Show table calculated field when page open with filtering allowed

(0) ShareShare
ReportReport
Posted on by 2,453

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

  • 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,453 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans