Question

custom attribute in entity

  • 26 December 2022
  • 1 reply
  • 71 views

Userlevel 3
Badge +11

hi

can anyone share a quick document to add a custom attribute in an entity using these types. i want a field where I can use a SQL statement based on some filter/where clause.

 

 


1 reply

Userlevel 7

I noticed that the documentation for custom attributes on docs.ifs.com is broken (I’ve reported this now). You can have a look at this in the meantime (it’s for an earlier release, but most of it is the same) https://docs.ifs.com/techdocs/foundation1/040_administration/220_user_interface/020_custom_objects/040_custom_fields/020_create_custom_fields/020_add_edit_readonly_attribute.htm 

In the arguments field, you need to reference columns in the view/table you are using (the view/table related to the entity), and these should be prefixed with v or t.

So in your example, you might put v.customer_id in arguments and then in the select statement you’d put 
 

select our_id from &AO.customer_info_our_id where customer_id = :customer_id

The value in arguments (v.customer_id) is used in the where-clause above and prefixed with : (colon) 

 

 

Reply