Skip to main content
Solved

Custom Field Question

  • February 28, 2022
  • 2 replies
  • 883 views

Forum|alt.badge.img+6

Gosh, I know I’m like the 5th person to ask something similar to this but I was hoping for an IFS guru to help me out there.

I’m developing a custom field with a case clause but am getting the error

“Error in validation of Custom Attribute. The column line_item_no referred to in table t is not an approved persistent Custom Attribute.”

I feel like I’m 95% of the way there with this logic. Can anyone help me get the last 5%?

Arguments: v.order_no,v.line_no,v.rel_no,v.line_item_no

SELECT CASE
WHEN (real_ship_date-promised_delivery_date+4) > 0
THEN 'LATE'
WHEN (real_ship_date-promised_delivery_date+4) <= 0
THEN 'ON TIME'
ELSE 'ON TIME'
END CASE

FROM customer_order_line
WHERE order_no= :order_no
AND line_no = :line_no
AND rel_no = :rel_no
AND line_item_no = :line_item_no

Best answer by william.klotz

Hi @matthunter ,

 

We are using IFS Applications 10 Update 8 at the moment so that is what I used to test out your code. 

 

Your code looks good to me I was able to successfully create a custom read only field named DELIVERY_SCORECARD and I used your SQL statement in the custom field.  I created the custom field on the customer order line.

 

Here’s the SQL Code I used.

SELECT CASE WHEN (real_ship_date-promised_delivery_date+4) > 0 THEN 'LATE' WHEN (real_ship_date-promised_delivery_date+4) <= 0 THEN 'ON TIME' ELSE 'ON TIME' END CASE FROM customer_order_line WHERE order_no=:order_no AND line_no = :line_no AND rel_no = :rel_no AND line_item_no = :line_item_no

 

 

Here’s the main body of the custom field.

 

Regards,

William Klotz

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

william.klotz
Superhero (Customer)
Forum|alt.badge.img+21
  • Superhero (Customer)
  • 479 replies
  • Answer
  • February 28, 2022

Hi @matthunter ,

 

We are using IFS Applications 10 Update 8 at the moment so that is what I used to test out your code. 

 

Your code looks good to me I was able to successfully create a custom read only field named DELIVERY_SCORECARD and I used your SQL statement in the custom field.  I created the custom field on the customer order line.

 

Here’s the SQL Code I used.

SELECT CASE WHEN (real_ship_date-promised_delivery_date+4) > 0 THEN 'LATE' WHEN (real_ship_date-promised_delivery_date+4) <= 0 THEN 'ON TIME' ELSE 'ON TIME' END CASE FROM customer_order_line WHERE order_no=:order_no AND line_no = :line_no AND rel_no = :rel_no AND line_item_no = :line_item_no

 

 

Here’s the main body of the custom field.

 

Regards,

William Klotz


Forum|alt.badge.img+6
  • Author
  • Do Gooder (Customer)
  • 11 replies
  • March 1, 2022

Thank you William!

Looks like it is an issue with the updates to IFS then. I’m working with IFS9. I did a sneaky workaround and can use the CASE logic directly in Data Source Designer for Lobby. That’s where I was headed next anyway.

Really appreciate the help. To anyone who is reading this with similar issues, if your ultimate task is to create metrics and were planning on using Lobby, go straight there.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings