Skip to main content
Solved

WHERE clause in Custom Field


Forum|alt.badge.img+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.

 

Best answer by Kasun Balasooriya

Jur wrote:

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. 

View original
Did this topic help you find an answer to your question?

13 replies

Forum|alt.badge.img+9
  • Hero (Customer)
  • 59 replies
  • February 17, 2020

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


Binura Dodangoda
Hero (Partner)
Forum|alt.badge.img+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.


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 17, 2020
BinuraDodangoda wrote:

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.


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 17, 2020

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.

 


Kasun Balasooriya
Superhero (Employee)
Forum|alt.badge.img+20

Hi Shewa,

 

shewa wrote:

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,

 

 

 


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 17, 2020

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.


Kasun Balasooriya
Superhero (Employee)
Forum|alt.badge.img+20
Jur wrote:

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. 


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 17, 2020

@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?


Forum|alt.badge.img+9
  • Hero (Customer)
  • 59 replies
  • February 17, 2020

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


Kasun Balasooriya
Superhero (Employee)
Forum|alt.badge.img+20
shewa wrote:

@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. 

 


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 18, 2020
KasunBalasooriya wrote:
shewa wrote:

@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...


Forum|alt.badge.img+8
  • Author
  • Do Gooder
  • 30 replies
  • February 18, 2020
Jur wrote:

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.


Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • 35 replies
  • February 18, 2020

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings