Solved

Can I reference a value before it is saved?

  • 31 March 2021
  • 2 replies
  • 288 views

Userlevel 3
Badge +8

I have two CF that are referencing two custom logical units. The CF’s are in the same page.

In the list of values of the second CF I would like to create a saved search and in the where clause for the search use values from what is selected in the first CF before it is saved.

Is that possible?

BR Kresten

icon

Best answer by dsj 1 April 2021, 06:12

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge +10

Hello 

I have created a search in an LoV on a custom page where one custom field uses the value of another custom field to filter the search.  These two fields exist in the same CustomLU, though and havent tried where the Custom Fields reference different LU’s but since they are on the same custom page it should still work. 

 

I did have to use trial an error referencing the index in the array , e.g. [11] to get the right custom field so its not perfect but it works. If there is a way to reference the custom field name instead of its position that would be a better outcome - if anyone knows??

 

ORDER_NO = :i_hWndFrame.cpgManufToolDetailUsage.CustomPageField[11]

 

Note: cpgManufToolDetailUsage is the name of the custom page. 

 

Hope that helps,

David. 

 

Userlevel 7
Badge +20

Hi @krestensb  and @david.harmer ,

 

In the system info you can find the custom field references

Eg: custom fields in Prepare WO

 

as I assume, order is determined from the Order of appearance in object properties but I could be wrong here

 

You can create a saved search using the values of other custom fields just as David mentioned.

 

If you need that search condition to be the default when user opens the LOV, do following.

  • Add saved search for LOV

 

  • In the LOV results pane, RMB → Properties
  • Set the dialog startup behavior to use saved search

Hope it helps!

Damith