Mark Van
Mark Van

Reputation: 281

Check field value through 2 methods

I have a Report which i want to check on if a certain field on the SalesLine table is filled, if so, show the value of this field.

I have 2 custom tables which the report is using.

Table A & Table B

Table A, has a method with the following query:

select firstonly Id from TableB
        where TableB.Id == this.Id;
return TableB.Id;

Table B, has a method with the following code:

public SalesLine salesLine()
{
    return SalesLine::findInventTransId(this.InventTransId);
}

Now I need to check on the report, throughout these 2 methods, if Field X on the Sales Line table is filled. How can I accomplish this?

Upvotes: 0

Views: 59

Answers (2)

Modify table A method as below.

select firstonly Id,InventTransId from TableB where TableB.Id == this.Id; 
return TableB.salesLine().Fieldx ? TableB.Id : 0 ; 

Upvotes: 1

Alex Kwitny
Alex Kwitny

Reputation: 11564

The answer to your question seems to obvious to me...so maybe you're not asking your question correctly:

if(TableB.salesLine().FieldX)
    info("FieldX is filled");

Upvotes: 0

Related Questions