cancel
Showing results for 
Search instead for 
Did you mean: 

New Document or Saved Document ?

Former Member
0 Kudos

Hi,

I want to write a formatted search that performs a calculation differently depending on whether the user has started a new sales order or has opened a saved sales order.

My question is: When the query runs how do I differenciate between a new document and a saved document.

Thanks,

Conor.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I don't know what exactly you want to do but since this can't be done by SBO, check the database. The SQL keywords 'exists', 'in', or 'any' may help.

-->IF EXISTS(expression) then ...

-->select ....where EXISTS(expression)

-->select..where something IN (select..)

-->select...where someting=ANY (select...)

Former Member
0 Kudos

I had just managed to solve it there myself using exists. And when I returned to the question you had replied suggestion to use exists... ! In the query I just checked something like the following

if exists(select * from ordr where docnum = $[ordr.docnum])

BEGIN

.

.

.

END ELSE BEGIN

.

.

.

END

Cheers for the help!

Conor.

Former Member
0 Kudos

How do I reward you with the points...

Former Member
0 Kudos

Points rewarding don't seem to be working now. Try again a bit later.

Answers (0)