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,090

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

  • Suggested answer
    Pradeep_Prakash Profile Picture
    Pradeep_Prakash 717 on at
    RE: Showing value in a form on the basis of negative and positive values

    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.

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,090 on at
    RE: Showing value in a form on the basis of negative and positive values

    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

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,090 on at
    RE: Showing value in a form on the basis of negative and positive values

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans