Views Reply Votes
David Langschied
David
 5
restrict a browse with a calculated field
87
3
00
Posted: Dec 18, 2019   
Votes
Francis Malengier
Francis
 22
Replied 

Hi ,

 

some time ago i had the same requirement, I wanted a list of the items that have no stock.

I found the following trick :

In the local variables I added this piece of code :

pt_mstr is the table that is in my browse.

on find of pt_mstr do:
  find first in_mstr no-lock where in_domain = pt_domain and in_part = pt_part and (in_qty_oh > 0  OR  in_qty_nonet > 0) no-error.
  if available in_mstr then return Error.

  Init (pt_part).
end.

 

it is the 'return error' that does the trick. If you put that in an on find block of your table in the browse, it will skip that line.

the init function is the function I made to do my calculations of some calaculated columns.

I hope this can help you,

kr,

Francis

 

10
Replied: Jan 02, 2020
Votes
David Langschied
David
 5
Replied 

Thanks this a good thing to put into my pocket!

 

00
Replied: Jan 03, 2020
Votes
Franccy Van Weezel
Franccy
 6
Replied 

Sorry, is very interesting your way. Do you have any chance to share function "init".

Thanks.

00
Replied: Feb 18, 2020
Forums
All
Forum Help
Help Using Forums