Hide field in Search Criteria

Is it possible to hide a field that’s being using for Searching by using something a field like UserLevel.
I already have the UserLevel variable loaded, but don’t know if I can hide a field based on it.

I’m assuming something like
sc_field_display({ResponseEventOther}, “off”);
might work, but I don’t know what the field name would be…

Re: Hide field in Search Criteria

I guess you know what you mean, because re-reading your question does not help me understand what you are asking. Perhaps I need to have a few beers and repeat as necessary. <BG>

Regards,
Ccott.

Re: Hide field in Search Criteria

I will give you an example so you won’t have to get drunk to understand me

I have a user table.

I want to be able to search by 3 fields (userid, first name, last name) if I am the admin, and only search by 2 fields (first name, and last name) if I’m just a normal user.

I can handle the getting the userlevel to determine if I’m an admin or not, but if I am not an admin, I want to hide the search field for userid, so they don’t even see it.

I tried
sc_display_field({userid},off);
and
sc_display_field({userid},“off”);
and
sc_display_field({userid},‘off’);

in the onInit, and even on the onRefresh on the “search” tab, but I can’t seem to make it disappear.

Did that help?

Re: Hide field in Search Criteria

The first syntax is wrong, the others are OK.

I may be wrong, but I believe your fight is with it changing the display of a field in search and it is meant for the grid field itself.

I will have to verify this.

And yes… that did help :wink:

Re: Hide field in Search Criteria

i was having a similar problem, where I wanted to hide a field, and show a field depending on a select box’s value, and I couldnt figure out a solution. let us know if you figure this out.

Re: Hide field in Search Criteria

Created a ticket to add:
sc_display_search_field({fieldname},‘off’);

Regards,
Scott.