Is there a problem with a Per Relationship to the same BO?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Is there a problem with a Per Relationship to the same BO?

Post by BLOMASKY »

I have orders that are optionally linked to other orders in a 1 to 1 relationship. That seems to work fine. Looking at the SQL tables, all is good. The problem is, that I have a process that is called from a query (which uses OrderLines as input). Here is the code:

FIND OrderLines WHERE OrderLines = OrderLines.ps_LinkToContractorOrderLine
DISPLAY MESSAGE SEARCH_COUNT


I always get a ZERO. Nothing is found. Am I doing something wrong?

Thanks
Bruce
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Is there a problem with a Per Relationship to the same B

Post by PointsWell »

BLOMASKY wrote:I have orders that are optionally linked to other orders in a 1 to 1 relationship. That seems to work fine. Looking at the SQL tables, all is good. The problem is, that I have a process that is called from a query (which uses OrderLines as input). Here is the code:

FIND OrderLines WHERE OrderLines = OrderLines.ps_LinkToContractorOrderLine
DISPLAY MESSAGE SEARCH_COUNT


I always get a ZERO. Nothing is found. Am I doing something wrong?

Thanks
Bruce
My first impression is that this will not return anything because there’s no differentiator between what you are looking for and what you are comparing against.

How does the query get initiated? Can you differentiate ThisOrderLines.
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Is there a problem with a Per Relationship to the same B

Post by BLOMASKY »

PointsWell wrote:
BLOMASKY wrote:I have orders that are optionally linked to other orders in a 1 to 1 relationship. That seems to work fine. Looking at the SQL tables, all is good. The problem is, that I have a process that is called from a query (which uses OrderLines as input). Here is the code:

FIND OrderLines WHERE OrderLines = OrderLines.ps_LinkToContractorOrderLine
DISPLAY MESSAGE SEARCH_COUNT


I always get a ZERO. Nothing is found. Am I doing something wrong?

Thanks
Bruce
My first impression is that this will not return anything because there’s no differentiator between what you are looking for and what you are comparing against.

How does the query get initiated? Can you differentiate ThisOrderLines.
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Is there a problem with a Per Relationship to the same B

Post by PointsWell »

Did you mean to post? There was no new content.
BLOMASKY
Posts: 1473
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Is there a problem with a Per Relationship to the same B

Post by BLOMASKY »

Humm, the forum hates, me, after I try to post a msg, it tells me to LOG IN again and throw out what I posted.

Jaymer gave me the correct answer...

FIND OrderLines WHERE ... = ThisOrderLines.....

Bruce
customaware
Posts: 2405
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Is there a problem with a Per Relationship to the same B

Post by customaware »

BLOMASKY wrote:I have orders that are optionally linked to other orders in a 1 to 1 relationship. That seems to work fine. Looking at the SQL tables, all is good. The problem is, that I have a process that is called from a query (which uses OrderLines as input). Here is the code:

FIND OrderLines WHERE OrderLines = OrderLines.ps_LinkToContractorOrderLine
DISPLAY MESSAGE SEARCH_COUNT


I always get a ZERO. Nothing is found. Am I doing something wrong?

Thanks
Bruce
Did you try....

FIND OrderLines WHERE OrderLines = ThisOrderLines.ps_LinkToContractorOrderLine
DISPLAY MESSAGE SEARCH_COUNT
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply