QAD browse problem

Shubham Pipada

New Member
Hello everyone,
I am not sure whether this is the correct place to ask this question but still asking.
I had written a function in sales order browse which was suppose to return a logical answer. Following is the function:
Code:
function get_soc returns logical(input domain as char,input nbr as char):
def var lvl_soc as logical.
for each so_mstr where so_domain = domain and so_nbr = nbr no-lock:
   if so_trl3_amt = 0.0 then
      lvl_soc = no.
   else
      lvl_soc = yes.
end.
return(lvl_soc).
end.
And i had a function that already existed in the browse and it worked fine. It was suppose to return logical too. And the function i wrote and the existing function have no dependancy. But still, the existing function instead of returning yes/no returned blank!
I have a doubt that maybe was it due to the variable that i took in my function and returned it? Coz when i removed this variable, and directly returned the field of the std table, everything worked fine.
Sorry if this sounds vague, but hoping that i get an answer here even if i guess its not a platform to ask QAD question here.
 
Last edited by a moderator:

Cringer

ProgressTalk.com Moderator
Staff member
Have you messaged the values of domain and nbr before the for each? Does the for each actually resolve to valid results?
How are you using the function?
 

Shubham Pipada

New Member
Have you messaged the values of domain and nbr before the for each? Does the for each actually resolve to valid results?
How are you using the function?
Yaa! Through query i tried for single records.......and it worked fine i mean the results were correct!
But its so strange that a logical field returns blank value in browse!! But when the same function when ran on mgeditor with output being displayed, it showed either yes/no only!
 

Cringer

ProgressTalk.com Moderator
Staff member
When you say it's a blank value in the browse, I don't understand. Is it a component part of the query of the browse?
 

TomBascom

Curmudgeon
There is some sort of framework code involved that is doing something. The use of the word "browse" may be a qad thing rather than the ABL widget.
 
Top