Solved

Using a Custom Field as a parameter in Read Only Custom Field (APS9)


Badge +4

Hi All,

I’m trying to create a custom field that looks up the planner of a part (using INVENTORY_PART_API.Get_Planner_Buyer) where the company is always 1 and the part number is an other custom field in a custom logical unit I’ve created. Please see the image below:

 

Here is the error I’m getting during validation:

 

icon

Best answer by BOrion 31 August 2020, 15:25

View original

10 replies

Userlevel 7
Badge +24

hello,

try cf$_nc_part

(you’re missing an underscore)

Userlevel 3
Badge +8

INVENTORY_PART_API.Get_Planner_Buyer('1',v.cf$_nc_part)

Badge +4

Thank you guys for the replies, however, I still get the same error.

 

Custom Field Expression
Error

 

Userlevel 3
Badge +8

try v.cf$_nc_part

 

v

not

t

 

v = variable

Badge +4

I tried v as well with the same error.

 

I always thought the v in this expression was view and t was table. Thanks for that clarification!

Userlevel 3
Badge +7

Did you try without both v and t as well?

Badge +4

Did you try without both v and t as well?

Yes, both have been attempted. It seems as though any time I try to reference any custom field in another Read Only field, the same error is present.

Userlevel 3
Badge +8

That’s strange.

Look at the example below:

Inventory Part M1010-123 has Planner = TOOK

Another Inventory Part ZAK01 has CF “Nc Part” value referring to part M1010-123.

Another CF “Nc Part Planner” works fine.

 

Nc Part Planner definition:

 

Userlevel 3
Badge +7

Did you try without both v and t as well?

Yes, both have been attempted. It seems as though any time I try to reference any custom field in another Read Only field, the same error is present.

Yes. I have experienced same when using read-only custom fields in select statements. But for expressions using read-only custom fields work.

Badge +4

Well it looks like there is something else going on with our application. This should work, and does work for other users. I have a ticket with IFS to investigate. Thanks!

Reply