Question

unable to load data for custom field

  • 13 October 2021
  • 5 replies
  • 332 views

Userlevel 5
Badge +10

Hi All,

Created a custom field ‘Packing Group’ in window 1 that must retrieve her value from table  SAFETY_PRECAUTION_cfv  based on another custom field cf$_hazard_id  in window 1. but my SQL is not returning any value ! what am I missing ?

Much appreciate your suggestions .

Thanks 


This topic has been closed for comments

5 replies

Userlevel 7
Badge +31

Hi @NMALKI,

In arguments, if you are taking the value from the view, it should be prefixed with v, not t. Therefore try changing the argument to v.cf$_hazard_id.

And the way you have specified the bind variable in the select statement is also not correct. 

Try this SQL statement instead.

select CF$_PACKING_GROUP from SAFETY_PRECAUTION_CFV where HAZARD_ID = :CF$_HAZARD_ID

 

Also refer to the documentation for select type read only Custom Fields here:

https://docs.ifs.com/techdocs/foundation1/040_administration/220_user_interface/020_custom_objects/040_custom_fields/020_create_custom_fields/steps_itd/set_ImplementationType.htm?nobanner=true

This explains what I mentioned above. 

Hope this helps!

Userlevel 5
Badge +13

HI @NMALKI,

Can you try the below statement for the select statement?

select CF$PACKAGING_GROUP from SAFETY_PRECAUTION_cfv where cf$_hazard_id = :cf$_hazard_id

Best Regards,
Bhagya

Userlevel 5
Badge +10

nah it didn’t work ‘Invalid identifier because the field is hazard_id  in SAFETY_PRECAUTION_cfv (not hazard_id_cfv).

thanks anyway 

Userlevel 5
Badge +10

@Charith Epitawatta thanks for your clarification . 

Still no result when I tried the above SQL.

I also have the below error when I try to use v.cf$_hazard_id.

Thanks 

Userlevel 7
Badge +31

Hi @NMALKI,

@Charith Epitawatta thanks for your clarification . 

Still no result when I tried the above SQL.

I also have the below error when I try to use v.cf$_hazard_id.

Thanks 

According to this message, you are creating this field on a Custom Logical Unit. In that case, please check whether the field CF$_HAZARD_ID exists in the relevant database table first(H_A_Z..._CLT table mentioned in above message) and prefix the argument with t instead of v as the error message explains. 

Hope this helps!