Question

List of values based on variable

  • 15 December 2021
  • 7 replies
  • 679 views

Userlevel 3
Badge +6

We have a custom logical unit populated by another system that has a list of codes for suppliers.

 

Custom LU attributes

  1. Vendor Id
  2. Code Number
  3. Description

A supplier can have 1 or more codes, but the user needs to select a single code for a Purchase Order based on a sub-select of codes for the supplier of the purchase order.

 

I’ve created a custom field on the purchase order which is a ‘Reference’ to the LU view. But I’m stuck on how to get the LOV to only show the values for the specific supplier (it currently shows all the rows in the LOV view).

 

Should I be using a Custom Enumeration instead? All of our existing enumerations are static, so I’m not sure if it’s possible to have dynamic enumerations. TIA


This topic has been closed for comments

7 replies

Userlevel 6
Badge +10

Hi @mdeanton,

There’s no option to set where clause for LOV in custom fields. As a workaround you can use a saved search. 

 

Please refer to the below KBA:
 

 

/Nimesh

Userlevel 3
Badge +6

Ok thanks, I think I understand. But what is the syntax to get the vendor_no from the underlying page into the saved search? 

 

Userlevel 3
Badge +6

@Nimesh Kasun  I’m stuck at the step above. How can I get the value of the supplier id on the client page into the saved search?

Userlevel 6
Badge +10

Hi @mdeanton,

Make sure your mentioned custom field is Reference Type. If so, please follow these steps.

 

Find the referencing field. Ex:  In your case it’s Supplier (VendorNo) I guess.

Copy the highlighted text for easy use: For you: frmPurchaseOrder.dfVendorNo (Please check again)

 

Then in the saved search, make the condition as below:

Ex: For you:

CF$_VENDOR_ID = :i_hWndFrame.frmPurchaseOrder.dfVendorNo

 

That’s all. Now when you use the saved search, it will refer to the value for Supplier and filter the list.

 

Hope this worked for you?

 

/Nimesh - https://www.linkedin.com/in/nimeshkasun

Userlevel 6
Badge +10

Hi @mdeanton,

Make sure your mentioned custom field is Reference Type. If so, please follow these steps.

 

Find the referencing field. Ex:  In your case it’s Supplier (VendorNo) I guess.

Copy the highlighted text for easy use: For you: frmPurchaseOrder.dfVendorNo (Please check again)

 

Then in the saved search, make the condition as below:

Ex: For you:

CF$_VENDOR_ID = :i_hWndFrame.frmPurchaseOrder.dfVendorNo

 

That’s all. Now when you use the saved search, it will refer to the value for Supplier and filter the list.

 

Hope this worked for you?

 

/Nimesh - https://www.linkedin.com/in/nimeshkasun

Hi @mdeanton , 

Just a follow-up. Did this work for you? 

 

/Nimesh

Userlevel 3
Badge +6

Sorry for the delay. Thank you, I think this is working, I need to do a little more testing. Is there a way to restrict form so the saved search must be used by all users?

Userlevel 2
Badge +6

Hello,

 

Is there a way to replicate this in IFS Cloud ? Saved search is available on LoV lists but how can we use fields on the current screen as parameter ?

 

Regards,

Trishen