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 :
Microsoft Dynamics AX (Archived)

Showing value in a form on the basis of negative and positive values

(0) ShareShare
ReportReport
Posted on by 3,110

Dear Experts,

in a form field i want to show a value on the basis of negative and positive value. For example is below in code:

if(inventtrans.qty = 1)

{

info("IN")

}

else (inventtrans.qty== -1)

{

info("out");

is it possible if the value is in plus(+) on the form field it shows "IN". Otherwise, minus(-)

Thanks and Regards,

Shabir Ahmad

*This post is locked for comments

I have the same question (0)
  • Shabir Ahmad Profile Picture
    3,110 on at

    Crispin John Augustine,

    Thanks for your prompt response, my question is for which table or field should i write display method in future.I mean to say, how i will know that for this field i should write display code. The display method will be on DPBase class in the report or in the table ?

    Thanks and Regards,

    Shabir Ahmad

  • Shabir Ahmad Profile Picture
    3,110 on at

    Crispin john Augustine,

    Sorry for wrong reply, my above response was for report as i was resolving report problem as well.So i did two post, i thought your response for report.

    Thanks and Regards,

    Shabir Ahmad

  • Suggested answer
    Pradeep_Prakash Profile Picture
    717 on at

    Hi

    In order avoid performance. You can create a new Enum with IN and OUT and assign it to the new field.

    Before the record insert in the InventTrans insert method. You can assign the value to new field based on your condition and use this field to display on the form.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans