Skip to main content
Solved

Custom Field on Service Quotation

  • November 2, 2022
  • 7 replies
  • 111 views

Forum|alt.badge.img+12

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, 

 

 

Best answer by lisa.gilesAB

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

7 replies

Link
Superhero (Customer)
Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1265 replies
  • November 2, 2022

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.


Forum|alt.badge.img+12
  • Author
  • Sidekick (Customer)
  • 104 replies
  • November 2, 2022

@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 :)


Link
Superhero (Customer)
Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1265 replies
  • November 2, 2022

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.


Technical Outlaws
Hero (Employee)
Forum|alt.badge.img+11

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.


Forum|alt.badge.img+12
  • Author
  • Sidekick (Customer)
  • 104 replies
  • November 2, 2022

@Link 

I now get this:

 

sorry, any ideas?


Forum|alt.badge.img+12
  • Author
  • Sidekick (Customer)
  • 104 replies
  • November 2, 2022

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

 

Sorry, I am struggling with this one


Forum|alt.badge.img+12
  • Author
  • Sidekick (Customer)
  • 104 replies
  • Answer
  • November 2, 2022

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