Get a Jumpstart with our Sample Apps
Results 1 to 11 of 11

Thread: Tablet Sample App: Checklist Items

  1. #1
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    385

    Default Tablet Sample App: Checklist Items

    The "pass/fail" controls in the sample tablet app are Custom Items created using a ViewBox. Dan Bricklin explains how these controls were built in two videos. The first video, shown below, covers how the Editor Set for the checklist items was built. It uses a combination of a ViewBox, CSS styles, and some javascript to create a button-like interface. In the second video, "Tablet Form Checklist Swipe", Dan Bricklin explains how the swipe and double tap behaviors were implemented.

    Tablet Form Checklist Items
    presented by Dan Bricklin, Alpha Software CTO



    Video Link: http://www.alphasoftware.com/video-library/?v=4948

    Check out the second video, Tablet Form Checklist Swipe, in the video library: http://www.alphasoftware.com/video-library/?v=4944.

    Prerequisite Knowledge Base
    If you're unfamiliar with the sample tablet application or would like to download it, check out these resources:



    Have you created a Custom Item in your tablet application or made modifications to the sample app?
    Last edited by Beta Spark; 09-11-2015 at 06:27 PM.
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

  2. #2
    Member
    Real Name
    Alan M Neiss
    Join Date
    Jun 2016
    Posts
    28

    Default Re: Tablet Sample App: Checklist Items

    Hi Sarah,

    Thanks for the great app. I've created a fire inspection app using the example and have it connected to a sql server database. All is working as expected when an item(s) are swiped and the database is updated when a synchronization is run but when the pass/fail buttons are used I can see the field being changed accordingly and the record is marked as dirty but after a sync is run the data in the database is not updated. For some reason the pass/fail is not working to set the field swipe. Is there something I've missed that is causing this to happen?

    Thanks
    Al

  3. #3
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,376

    Default Re: Tablet Sample App: Checklist Items

    Al, is it possible that the field data type could be the issue? What is it?

    I'd be interested in pursuing this issue of yours... but there are a number of ways to establish a pass/fail button. Is it in a ViewBox? A FormView? An Editor? Are you working from a List Control?

    I have a UX with a List Control, a FormView with several fields running off an Editor. But... one INT field... is shown in the List Fields tab as (L) and I have Transform data type set ToLogical.

    In the List it displays as true or false. I don't have an Editor for this field... it's a direct edit... and in the FormView it has Other Settings set to Has On/Off Value, Logical, true,false and it's set as a Switch item. Tapping on the Switch and saving causes the List to change to true or false and it does then sync to the table without issue.

    There are a number of ways to mix and match all this stuff... and I think it's easy to get wrapped around the axle... as I've done many times. Could you post a simple example of what you're working with?

  4. #4
    Member
    Real Name
    Alan M Neiss
    Join Date
    Jun 2016
    Posts
    28

    Default Re: Tablet Sample App: Checklist Items

    Hi David,

    Thanks for your comments. I am used a copy of the Sample Tablet App listed earlier in this thread that is connected to a SQL Server database and most are of char() type. I'm also using a List Control, FormView and an Editor that has a ViewBox. I've been making an attempt to package the app up with an access database so I can post an example as you requested.

    Thanks

  5. #5
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,376

    Default Re: Tablet Sample App: Checklist Items

    If it's too much trouble for the Access table, then you could dump a SQL Server table... with or without data... and I'll put that in. If the table isn't too complex you could just list the fields and I'll build it.

  6. #6
    Member
    Real Name
    Alan M Neiss
    Join Date
    Jun 2016
    Posts
    28

    Default Re: Tablet Sample App: Checklist Items

    Hi David,

    Please find attached a scaled down version of the app. I've taken your advice and included two sql files along with the UX. Please use Al for the login and password.
    Attached Files Attached Files

  7. #7
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,376

    Default Re: Tablet Sample App: Checklist Items

    A scaled down version? Yikes... I'd like to see the full version. The sample is far too complex to debug in it's entirety... logins, offline data cache... so I went back to basics and started with the section that's giving you trouble... List1... and the non-updating of the Pass/Fail process. I copied List1 and pasted it into a new UX. Then I added the Detail View fields and the normal Save and Sync buttons.

    Running the UX at this point allowed me to select and edit a row... but the Pass/Fail fields would not update.

    This is because you have the Inspections table set to Read-Only in the List, Detail View, Table Properties. Correcting that... and turning off "Check for write conflicts" on 2 of the Date fields allowed my test UX to update Pass/Fail. I think your date fields may not be formatted correctly because they're showing odd dates when rendered... but that's a different issue.

    I couldn't test with your UX because there's too much going on in your setup that I don't have duplicated. So... test with yours and report back.

    BTW, the test tables were great... but you forgot to include Department in the Table script which made the full Data script fail. Easily corrected but thought I'd let you know.

  8. #8
    Member
    Real Name
    Alan M Neiss
    Join Date
    Jun 2016
    Posts
    28

    Default Re: Tablet Sample App: Checklist Items

    Sorry for the problem with the Department table and the read only on Inspections. So I'm able to swipe an item and after I run a sync on that record the data is saved accordingly. But when I use the editor EDITORCHECKLISTITEM and ViewBox control radiobuttons to update the fields it reflects the correct color but after a sync the data is not saved and is returned to is original value.
    Thanks again for your help.

  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,376

    Default Re: Tablet Sample App: Checklist Items

    I think I've found this issue. Have a look in the EDITORCHECKLISTITEM property... Get value from editor. This is where we commit the value we just chose from the Radio button. The problem is that value is coming back as an array... not a straight value.

    This code...

    Code:
    var vbobj = {dialog.Object}.getControl('radiobuttons');
    return vbobj.value;
    returns a array with a single entry.

    So... it's messing with the save... giving a really odd error... but one that tells me we have a data problem.

    The code should read...

    Code:
    var vbobj = {dialog.Object}.getControl('radiobuttons');
    return vbobj.value[0];
    Attached is a really simple UX working with your SQLServer Inspection table showing Pass/Fail working.
    Attached Files Attached Files

  10. #10
    Member
    Real Name
    Alan M Neiss
    Join Date
    Jun 2016
    Posts
    28

    Default Re: Tablet Sample App: Checklist Items

    David,

    Thank you so much for your help. I've made the change in my Inspections app and it's working great. I know I've got more to work on such as the date fields but I'm pleased that you were able to help with this problem. I'm sure that others who used the Tablet Sample as a template will benefit from this solution.

    Thanks again!
    Al

  11. #11
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,376

    Default Re: Tablet Sample App: Checklist Items

    Excellent... glad it worked out... and thanks for your posted sample and data... it really helps. Real data-bound examples are so important in understanding how to work with the FormView and ViewBox controls. These are really powerful controls when used by themselves and even more so when used together.

Similar Threads

  1. What kind of Tablet App are you Building?
    By Beta Spark in forum Tablet-Optimized Form Capabilities Beta
    Replies: 10
    Last Post: 10-18-2015, 06:24 PM
  2. Questions about the Sample App
    By Beta Spark in forum Tablet-Optimized Form Capabilities Beta
    Replies: 12
    Last Post: 09-24-2015, 10:47 AM
  3. How to do Line items on a tablet
    By pcaspa in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 11-22-2014, 04:02 PM
  4. Sample App?
    By StevenMcLean in forum Application Server Version 10 - Web/Browser Applications
    Replies: 12
    Last Post: 06-15-2010, 09:47 AM
  5. All items not in app. after creating install package
    By jdoyle in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 02-14-2009, 12:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •