2 of 2 people found this helpful
Just hack it.
1. Remove the clear option from the field
2. In your sql, add a hardcoded sort column to your query and do a union with "(clear)" - Like this
Select MenuData, 1 thesort from DataForm where status = 0
select '(clear)', 2 thesort from dual --(from dual if on oracle, otherwise skip it)
order by thesort, menudata
You can control the sort integer to put clear at the top or the bottom depending on what suits your needs.
3. Add an active link that sets the field to $NULL$ if it = '(clear)'
I infact have already this workaround for the problem.
I was wondering if there is any issue with the version of AR Server I'm using and if anyone had faced the same issue.
Thanks for your response.
The workaround works perfectly fine. The clear option for the drop down field can be selected either Always or Search Only. As I have selected Search Only, in search mode you see two clear options. Is there a possibility to remove it completely from the field in Search mode too?
1 of 1 people found this helpful
This works in MS SQL. It may need to be tweaked for oracle, etc.
select login_name, thesort from ( select case '$OPERATION$' WHEN 'QUERY' then null else '(clear)' end login_name, 1 thesort union select login_name, 2 thesort from user_x ) subq where login_name is not null
I may not have answered your question correctly; I may have read too quickly.
What I just posted will make it so that on search, it only shows the built-in clear option, and not the extra sql clear option.
I don't think you can eliminate the built in one on search though, if that's what you were asking.
Yes, right. Thank you for your help