Solved

WHERE clause in Custom Field

  • 17 February 2020
  • 13 replies
  • 846 views

Userlevel 3
Badge +8

Hi,

I have created a custom LU and one of fields requires LOV. LOV view is a standard view and I want to pass a WHERE clause. In this case, view is DISCRETE_CHARAC_VALUE and I always want to get records in LOV WHERE CHARACTERISTIC_CODE = ‘ABC’.

How can I get this done?

 

Appreciate your response.

Thank you.

 

icon

Best answer by Kasun Balasooriya 17 February 2020, 15:20

View original

13 replies

Userlevel 4
Badge +9

You can use a saved search to populate a LOV. RMB in the LOV, then click ‘Properties’. There you can select a Saved Search.

Userlevel 5
Badge +11

Hi @shewa,

Could you please mention the configurations of the custom field: 

i.e. type of the custom field (persistent, read-only), any SQL statement used, etc.

Best Regards,
Binura.

Userlevel 3
Badge +8

Hi @shewa,

Could you please mention the configurations of the custom field: 

i.e. type of the custom field (persistent, read-only), any SQL statement used, etc.

Best Regards,
Binura.


Hi Binura,

 

Thank you very much for the reply. This is a persistent field, Reference field. Below shows the Reference page of the wizard. No SQL statements used.

 

Thank you.

Userlevel 3
Badge +8

Hi @Binura Dodangoda ,

Sorry, I am not sure you have received my reply.

Thank you very much for the reply. This is a persistent field, Reference field. Below shows the Reference page of the wizard. No SQL statements used.

Thank you.

 

Userlevel 7
Badge +20

Hi Shewa,

 

Hi @Binura Dodangoda ,

Sorry, I am not sure you have received my reply.

Thank you very much for the reply. This is a persistent field, Reference field. Below shows the Reference page of the wizard. No SQL statements used.

Thank you.

 

The screenshot from the wizard is missing in your reply, but I assume you are replying to the below screen: 

 

If you want to add a where clause to the select statement when running the query ( Can be seen when preview is pressed) as shown below, it can’t be edited. 

 

Do you want to store this value in the database for this particular filed under the Custom LU? 

 

Thanks,

 

 

 

Userlevel 3
Badge +8

Hi @KasunBalasooriya ,

That was the screen shot I was referring to.

Yes, I want to store value in the database under field TEST in custom LU. LOV should only show values where CHARACTERISTIC_CODE = ‘ABC’. In your screen shot above, it shows values for all characteristic codes.

Thanks.

Userlevel 7
Badge +20

You can use a saved search to populate a LOV. RMB in the LOV, then click ‘Properties’. There you can select a Saved Search.

This is the answer for your question. I’m attaching the screenshots for you to refer: 

 

 

Once the above option is set, you should get the LOV filtered with the values for CHARACTERISTIC_CODE = ‘ABC’

 

Hope this helps! 

 

Thanks. 

Userlevel 3
Badge +8

@KasunBalasooriya ,

Thank you Kasun. If it is the only way of achieving it, that's fine.

Could you please let me know how this will affect on user profiles? Should this to be saved into Base Profile for all the users to see only values in saved search?

Userlevel 4
Badge +9

Default Searches for a LOV must be included in the Base Profile.

Userlevel 7
Badge +20

@KasunBalasooriya ,

Thank you Kasun. If it is the only way of achieving it, that's fine.

Could you please let me know how this will affect on user profiles? Should this to be saved into Base Profile for all the users to see only values in saved search?

Yes, the above change can to be propagated to the  users by saving this to the base profiles. 

 

Userlevel 3
Badge +8

@KasunBalasooriya ,

Thank you Kasun. If it is the only way of achieving it, that's fine.

Could you please let me know how this will affect on user profiles? Should this to be saved into Base Profile for all the users to see only values in saved search?

Yes, the above change can to be propagated to the  users by saving this to the base profiles. 

 

@KasunBalasooriya Thank you very much for your response. Eventhough it is not ideal, saved searches work...

Userlevel 3
Badge +8

You can use a saved search to populate a LOV. RMB in the LOV, then click ‘Properties’. There you can select a Saved Search.

@Jur Thank you very much Jur. It is the only solution it seems.

Userlevel 2
Badge +6

you could try permission set filters but this could cause issues elsewhere on the system...

Reply