Search Dashboard Formula Help Please.
I'm trying to create a search dashboard. I have it set up, I'm close, but I don't have the formula correct. Here's what I've done so far:
1) I created a From, added a view field, and set the view to look into my databases' Assets table.
2) Then, in the form, I added a text field titled "Search Item Type." I want to be able to select the different Item Types (that's a choice field in the Assets table), by typing their name into the "Search Item Type" field.
3) I have the formula of Select Assets on the View field, and that works to show the entries of that table.
4) I need help with completing the formula so when I type one of the tool types in the Search Item Type field, the view shows only those items. This is the code I wrote. It does not work. Keep in mind I know nothing about code.
9 replies
-
Hi,
let search := lower('Search Item Type');
select Assets where lower(text('Item Types)) = searchShould do the trick....
-
I've hit the 'Post' button to fast....
text('Item Types') extracts the text from the choice field.
Iv'e added lower because if you missed a capital letter there would be less mistakes.
Best,
Steven
-
Not quite there yet. Please revise. Thanks. This is what I see:
-
I see I missed a '
-
And a ) also
-
That's it! Thank you, thank you, thank you, Steven! Now I want to change the search field into a choice field to make my searches faster and easier. I'll play with it a bit on my own and ask for help if I get stuck.
-
I changed it slightly so that you didn't have to type an exact match (using the same field names here would be) if this helps anyone:
let search := lower('Search Item Type');
select Assets where contains(lower(text('Item Types), search) -
I use this script in the Formula of the view
let recs := (select 'PROJECT EQUIPMENT'); - the table searched
if 'SEARCH CLIENT' then - the field I am searching from
let s := 'SEARCH CLIENT';
recs := recs[CLIENT like s]
end;
recs
Result
The red X clears the field. I have 6 or so views each coming to view based on the search field I search from.
All the Search fields ready for action
-
I use this and work good, is a model dB
Is a Double Search
Content aside
- 1 yr agoLast active
- 9Replies
- 1985Views
-
5
Following