Search Inside a Table on Ipad, Apple IOS
J

I am trying to search for a part number inside a table.  For example part number  "CB-4F-1301-01" in field Part Name by searching for the short string "1301".

When I try this using the Find tool from the left side menu the results only include the table record ID "1301" and another record which has "1301" in another field, which I understand since the Find tool searches the entire database.  But, it does not show a result for Part Number "CB-4F-1301-01".

It appears the Find tool wants to get an exact match.

So, I can try to use the search inside table function, but it appears I can only use this from the browser since this function requires either a Right Mouse Key or key sequences.  There is no widget in the GUI.  The manual states the following:

Search inside a table

Ninox offers two ways how to search inside a table:

Right-click on the table view
Strg + F on Windows or Cmd + F on Mac

I have searched the forum and Alexander provided the same answer.

So, how do I execute this type of search on my iPad?

I have been able to get the correct result by using a filter on the Part Name column, but this seems like a very complicated way to achieve the result for such a simple function that I want to give to a user of an iPad.

I am looking for a very intuitive way to get this search to work on an iPad, and the only functions I want to give my users are Search and add a Photo.  Adding a photo is really easy, but getting a correct search result is proving to be more difficult than I would expect.

Any ideas?

Jamie

Ninox Profile

@Jamie...   Two ideas come to mind..   First.. create a field.. called "Search Part Number" and within the "Part Numbers" trigger after update.. put something like the following.. 

let t := this;
t.('Search Part Number' := replace('Part Number', "-", " "))

 

The "find" feature works on "word" boundaries.. In your part number.. the "-" (dash) makes it all one word.. so it will not find a sub part. 

findOption1

 

Another option is to create a Search form.. and a view.. for the view.. use a select something like.. 

let t := this;
(select Product)[contains('Part Number', t.'Search Value')]

findOption2

 

If you do not want the user to have to click the desired row to open the detail.. You can put the above view code into a search button .. and put something like.. 

let t := this;
openRecord(record(Product,first((select Product)[contains('Part Number', t.'Search Value')])))

Which wil open the "first" match in case of multiples. 

Ninox Profile

897AC1B8-6FD4-41C5-AE5B-6A0CC0ADC63B

I used the Find function in the circled menu and it worked perfectly. I searched using only 1301 as the search criteria.

J

Sean.  Thanks that works. Duhh.  Sorry to bother everyone for such a simple problem.  To my defense, I did try to find the answer in the online manual.

Cheers,

Jamie

Ninox Profile

No worries, that’s what the forum is for  :)

B

@Sean; your suggestion about to open a matching record without clicking using the code below works perfectly...

 

Is it possible to modify this code so that the cursor remains within that "Part Number" field? Currently, you still have to click this field to put the cursor back in (so you can search another record) after you have found your first matching record. This means it is not as fast and easy as where you would only have to change the Part Number to have everything else update as well.

 

Do you understand what I am trying to achieve? If not, please let me know what parts I should elaborate on :).

 

The code you used was:

"If you do not want the user to have to click the desired row to open the detail.. You can put the above view code into a search button .. and put something like..

let t := this;
openRecord(record(Product,first((select Product)[contains('Part Number', t.'Search Value')])))

Which wil open the "first" match in case of multiples."

Thanks a lot,
Bas

 

Ninox Profile

@Bas, You are referring to Mconneen's code, but as far as I know, it's not possible to set focus to a field programmatically yet.

B

@Sean: true, true! I must have not had my glasses on... Thanks for confirming it does not seem possible to set focus to field programmatically (for now?)... 

 

@Mconneen: sorry, a belated credit where credit is due ;)...

Reply