web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

CalcFormula with if Condition

(2) ShareShare
ReportReport
Posted on by 292

HI,

is there a way to use CalcFormula  to  lookup for values from different table based on the value in another filed  or a constant value using IF statement?

Ex : 

            CalcFormula =  if ( field(A) = 1  )   Lookup("Table1".Name where("Record Type" = const("Some Value
                                      else if(filed(B)=2 ) lookup("Table2.Name where where("Record Type" = const("Some Value) ;
          
            FieldClass = FlowField;

Thanks,

Nishan

I have the same question (0)
  • Suggested answer
    tanya07 Profile Picture
    1,638 on at

    Hi,

    Flowfields cannot be conditioned. You can use other ways to do it.

    Thanks,

    TK

  • Nishan80 Profile Picture
    292 on at

    what are the other ways ? i can't use "tablerelation" also as a temp table also involves in my use case.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Maybe you need to generate the sum in a function instead of using a flow field. Sometimes that can be necessary.

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, If you just want to display this data on the page. You can create a variable, display it on the page, then handle this program in the page trigger.

    Hope this will help.

    Thanks.

    ZHU

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans