Discussions

 View Only
Expand all | Collapse all

WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

  • 1.  WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-17-2017 19:22
    I'm looking for a way to give my users a faster way to retrieve their search results (fewer clicks.) Right now when creating a report utilizing "ask the user" on a specific field it returns the values in a table instead of directly to the form. Just cumbersome and needless. 
    What I'd like to do is essentially re-create the quick table search on a homepage. When what I'm searching for has a single exact match, the record is presented in form view instead of a table.
    If there is a quick URL I'm overlooking and could utilize to create a field for and set as the default value right on the form would be great. Allowing them to easily bounce from the current record to another as well. My coding skills are clearly less than optimal. Any ideas?


  • 2.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-17-2017 19:50
    Can you clarify where the user is when they are running this query?  Are they sitting on a record?  Can you give an example using a use case with your table names so I understand the business objective here.


  • 3.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 06:29
    My guess is to save clicks... which saves time... which saves money...


  • 4.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 12:01
    Use script - here are the guts of the code:

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=578

    Notes:

    (1) The script uses ES6  backticks for string interpolation

    (2) The script uses ES6 fat arrow notation for functions


  • 5.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 13:44
    Sure... this is a single table, "MFG SOPs." A single records for each of our suppliers utilized by our Item and Cost Maintenance Group. It's a glorified spreadsheet in that one person on the team has the ability to edit, while the balance of the team can view records only. The initial excel file simply had a tab for the data manager, and another for the team to use in which they entered a MFG Code and a series of vlookups pulled over the data onto the "form." The issue is that over time it has become a very large excel file and was cumbersome to both edit and share.

    In rebuilding it I'd like to try and keep the easy type in MFG Code interface with the team at large, and from the Dashboard I just use the quick built in table search feature and use an exact match. That brings me right to the data form in view only mode for the team. PERFECT!

    But if I create a report in which I specify the user to select the MFG Code (from a list of 60k+) it kicks into a report first for them to have to click and view the form. Not a big deal I suppose, but it's an additional step. Additionally, I'd love to embed something like the Dashboard built in search in the form for them to find another without having to exit to the table's default report.


  • 6.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 13:48
    I have no idea what you are saying here.


  • 7.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 13:59
    I finally understand what GB is saying.

    GB  likes the smart behavior of the dashboard Search feature that if it only gets a single hit rather than returning a report with one record, it displays that 1 record on a form.


  • 8.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 14:57
    Sorry @Danimal, my follow up was meant for @QuickBaseCoach App Dev./Training.
    Ironically though, I have no idea what you are saying in your reply either, but also have no doubt it would solve my problem. (I come from the business side and am learning the IT coding piece.) You're both great resources in the community. Thanks so much.


  • 9.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 14:58
    GB, does the user know the Record ID or the Key field of the record they want to jump to?


  • 10.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 15:26
    Yes, I made the MFG Code the key field. 


  • 11.  RE: WHEN 1 RESULT IN SEARCH, DIRECT TO FORM INSTEAD OF REPORT

    Posted 04-18-2017 15:32
    if you want to make a formula URL button to go to a record on a form , then you can make a formula like this

    URLRoot() & "db/" & dbid() & "?a=dr&key=" & URLEncode([mfgr])

    That will display the record.

    To edit the record, change the dr to er.  (ie instead of display record its edit record)

    If the record is not in the same table that the URL button is on, then you need to specify the whole table name from Advanced Properties/.

    URLRoot() & "db/" & [_DBID_MY_TABLE_NAME] & "?a=dr&key=" & URLEncode([mfgr])