0

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.

Screen Shot 2019-08-19 at 7.09.26 PM

9 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    Hi,

    let search := lower('Search Item Type');
    select Assets where lower(text('Item Types)) = search

    Should do the trick....

    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    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

    • Mr_K
    • 5 yrs ago
    • Reported - view

    Not quite there yet. Please revise. Thanks. This is what I see:

    Screen Shot 2019-08-20 at 5.54.40 PM

    • Mr_K
    • 5 yrs ago
    • Reported - view

    I see I missed a '

    Screen Shot 2019-08-20 at 5.56.15 PM

    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    And a ) also 😉

    • Mr_K
    • 5 yrs ago
    • Reported - view

    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.

    • Sean_Wood
    • 1 yr ago
    • Reported - view

    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)

    • Alan_Cooke
    • 1 yr ago
    • Reported - view

    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

    • Rafael Sanchis
    • Rafael_Sanchis
    • 1 yr ago
    • Reported - view

    I use this and work good,  is a model dB 

    Is a Double Search 

Content aside

  • 1 yr agoLast active
  • 9Replies
  • 1985Views
  • 5 Following