Skip to main content

I confess my Custom Field experience is limited so I am hoping someone can help.

I want a Custom Field on the Service Quotation Header that pulls the Total Cost from the Service Quotation Totals Tab.

 

When I do the Select Statement in Sql query it returns what I am expecting but in the Custom Field I get a bind error.

 

Can someone please advise what I have done wrong?

 

Select Statement:

Select total_cost from service_quotation_totals_uiv where quotation_no =: quotation_no

 

thanks, 

 

 

Hi @lisa.gilesAB 

your sql query looks good. I recommend you to use also the contract or company.

Maybe you can provide some screenshots to check it.


@Link  thanks for replying. Do you mean use the Contract or Company as an ‘and’ clause so quotation_no and contract = contract or something similar?

 

My Statement:

and this is the error i am receiving:

any help would be greatly appreciated :)


Hi @lisa.gilesAB 

exactly. To get only one data.

In this case choose the option “Select”. And then you need two parameters:

v.quotation_no, v.contract (or v.company)

 

My recommendation:

Select total_cost 

from ifsapp.service_quotation_totals_uiv 

where quotation_no = :quotation_no 

and contract = :contract 

(It is only an example)

You have to check whether you can use the parameter contract or company.


I think a slight correction is needed with the way you have written your binding.

Your example.

quotation_no =: quotation_no

Should be.

quotation_no = :quotation_no

 

Also if you look at the view service_quotation_totals_uiv, you may need a few other columns or perhaps sum the total cost because using just the quotation no may return more than one record.


@Link 

I now get this:

 

sorry, any ideas?


@Technical Outlaws Can you provide an example of what the sql would look like? 

 

Sorry, I am struggling with this one


I Fixed it 🙂 I am not really sure what I did but it is working 🙂 Thanks everyone! 


Reply