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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

i Want to put 'not equal' condition on the relation

(0) ShareShare
ReportReport
Posted on by

I was just creating a view when I ran into a problem.

I want to give the condition "not equal(!=)" to the condition of the relation,

but I can't put it in the view of D365.

If you know how to put 'not equal' conditions on the relation , please leave a comment

================================================================================================================================================

//detail 4
while select SumOth
where SumOth.ItemId == this.ItemId
join DimOth
where DimOth.inventDimId == SumOth.InventDimId
&& DimOth.InventSiteId == this.InventSiteId
join LocaOth
where LocaOth.InventLocationId == DimOth.InventLocationId
&& LocaOth.TYM_PartsSalesBranchOffice == NoYes::Yes
join CusOth
Where LocaOth.TYM_BranchOffice != CusOth.SegmentId
&& CusOth.AccountNum == this.CustAccount

{
// ResultSumFac += SumFac.availPhysicalCalculated();
ResultSumOth += SumOth.AvailPhysical;
}

this.OtherStock = ResultSumOth;

================================================================================================================================================

It's a supplementary explanation.
The 'not equal(!=)' condition I mentioned is the

'LocaOth' in the 'while' statement above "TYM_BranchOffice != CusOth.SegmentId" part.

I want to save the value of the above while statement in the view.

And I got stuck in the relaxation part while working.

I am currently using dynamic365(Finance&operations) as the visual studio 2017 version .

I'm sorry if I didn't understand your answer correctly. thank you

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: i Want to put 'not equal' condition on the relation

    Thank you for the good information. I'll upload it the way I just said.Thank you for your efforts.

  • Verified answer
    Martin Dráb Profile Picture
    235,961 Most Valuable Professional on at
    RE: i Want to put 'not equal' condition on the relation

    Do you need to fetch any data from locaOth? If not, couldn't you use an exists join?

    By the way, let me format your code and paste it again via Insert > Insert Code. Please do it by yourself next time.

    while select sumOth
    	where sumOth.ItemId == this.ItemId
    	join dimOth
    		where dimOth.inventDimId == SumOth.InventDimId
    		   && dimOth.InventSiteId == this.InventSiteId
    	join locaOth
    		where locaOth.InventLocationId == dimOth.InventLocationId
    		   && locaOth.TYM_PartsSalesBranchOffice == NoYes::Yes
    	join cusOth
    		where cusOth.SegmentId != locaOth.TYM_BranchOffice
    		   && cusOth.AccountNum == this.CustAccount
    {
    	// resultSumFac  = SumFac.availPhysicalCalculated();
    	resultSumOth  = SumOth.AvailPhysical;
    }

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 756 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 629 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 514 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans