Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Alpha Transform, sqlite, and Amazon S3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alpha Transform, sqlite, and Amazon S3

    New to Transform and Amazon Web Services but not Alpha Anywhere. I am testing out Transform using a sqlite database so I went to AWS, setup an account, setup a separate user, and created a bucket with public access off. Used Alpha Anywhere to create my connection string and send my on device assets to my bucket. Now I am stuck on trying to get the database to download on my mobile device with no success. Already reviewed every video and document I could find on the matter but they do not help. How do I get this to work? Below is my code. I even tried to adjust my security settings on Amazon by using a temporary public link to the sqlite file. It did not work on Transform but it did in my browser. Any detailed steps, instructions, or comments is appreciated.

    Manifest
    Code:
    [
    {
    "url": "https://hackfin-4uaexwweq68ihb7e3xpdqe7oihhsnuse1a-s3alias.s3.us-east-1.amazonaws.com/mcm/mcm_manifest.json",
    "type": "sqlite",
    "version": 1,
    "size": 3550
    }]
    Options
    Code:
    [
    {
    "policy": {
       "download": {
       "onDemand" : true,
       "onLogin" : true
       },
       "onDemand" : {
       "checkprompt": true,
       "confirmprompt": true,
       "successprompt": true
       },
       "onLogin" : {
       "checkprompt": true,
       "confirmprompt": true,
       "successprompt": true
       }
    }
    }]
    Thanks,
    James

  • #2
    Originally posted by jhackney View Post
    New to Transform and Amazon Web Services but not Alpha Anywhere. I am testing out Transform using a sqlite database so I went to AWS, setup an account, setup a separate user, and created a bucket with public access off. Used Alpha Anywhere to create my connection string and send my on device assets to my bucket. Now I am stuck on trying to get the database to download on my mobile device with no success. Already reviewed every video and document I could find on the matter but they do not help. How do I get this to work? Below is my code. I even tried to adjust my security settings on Amazon by using a temporary public link to the sqlite file. It did not work on Transform but it did in my browser. Any detailed steps, instructions, or comments is appreciated.

    Manifest
    Code:
    [
    {
    "url": "https://hackfin-4uaexwweq68ihb7e3xpdqe7oihhsnuse1a-s3alias.s3.us-east-1.amazonaws.com/mcm/mcm_manifest.json",
    "type": "sqlite",
    "version": 1,
    "size": 3550
    }]
    Options
    Code:
    [
    {
    "policy": {
    "download": {
    "onDemand" : true,
    "onLogin" : true
    },
    "onDemand" : {
    "checkprompt": true,
    "confirmprompt": true,
    "successprompt": true
    },
    "onLogin" : {
    "checkprompt": true,
    "confirmprompt": true,
    "successprompt": true
    }
    }
    }]
    Hello James!

    Your policy is **almost** there. The "onDemand" and "onLogin" options are child properties of "download". You only need to define them once. The policy you shared has onDemand and onLogin defined both inside and outside download. It also has square brackets enclosing the whole policy, which are not needed.

    Here are two versions of the policy you posted that should work. The first simply sets onDemand and onLogin to true. The second defines the prompts for both.

    onDemand and onLogin set to true:
    Code:
    {
        "policy" : {
            "download" : {
                "onDemand" : true,
                "onLogin" : true
            }
        }
    }
    With prompts:
    Code:
    {
        "policy" : {
            "download" : {
                "onDemand" : {
                    "checkprompt": true,
                    "confirmprompt": true,
                    "successprompt": true
                },
                "onLogin" : {
                    "checkprompt": true,
                    "confirmprompt": true,
                    "successprompt": true
                }
            }
        }
    }
    You may need to log out and log in for the policy updates to take in the mobile and web fillers.

    Edit: Configuring your Bucket

    You need to set your S3 bucket's ACL setting to "READ" for "All users". Assets are downloaded directly from the device, which currently requires public read access.
    Last edited by Sarah Mitchell; 05-17-2022, 10:09 AM. Reason: added bucket info
    Sarah Mitchell
    Director of Customer Success | Alpha Software Corporation
    Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
    Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube

    Comment


    • #3
      Sarah, thank you for your post. I made the code changes as you specified. On the configuration of the bucket and if I am understanding correctly, I need to make this a public bucket. Is this correct? Wouldn't this make the data available to anyone including people outside of my target audience? I am a little concerned by this. Outside of AWS and Alpha Anywhere, is there a way to set this up to protect this data which is likely to include sensitive intangible assets? It would be great if Alpha allowed us to store the data directly on the Transform server. I appreciate your assistance.
      Thanks,
      James

      Comment


      • #4
        Originally posted by jhackney View Post
        Sarah, thank you for your post. I made the code changes as you specified. On the configuration of the bucket and if I am understanding correctly, I need to make this a public bucket. Is this correct? Wouldn't this make the data available to anyone including people outside of my target audience? I am a little concerned by this. Outside of AWS and Alpha Anywhere, is there a way to set this up to protect this data which is likely to include sensitive intangible assets? It would be great if Alpha allowed us to store the data directly on the Transform server. I appreciate your assistance.
        Hello James,

        Assets need to be accessible from movile devices when the data is downloaded (on login or on demand). If devices will need to acces the information from unknown locations, then you would need to configure the bucket to allow public access. If you could restrict access to download the assets while the devices are on an internal network, then you could restrict the bucket access to only permit downloads from devices located on that network.

        If you have assets that need to stay secure, you could alternatively build a Web Service to fetch the needed info from a server on-demand. The TransForm Programming Language (TPL) has provisions for calling web services. This approach requires a web connection, however.

        It would be great if Alpha allowed us to store the data directly on the Transform server.
        We agree! This is something we very much would like to do and is currently on our backlog.
        Sarah Mitchell
        Director of Customer Success | Alpha Software Corporation
        Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
        Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube

        Comment


        • #5
          Sarah, still having an issue. It does recognize I have an on-device asset to download but it returns an error, "1 file has issues". My sqlite database was created in Alpha Anywhere using tools and a database connection to my 3 excel tables. The manifest and db was exported to the bucket using the Transform tool available. The database file was named 'mcmdata.db'. Not sure why I am getting this issue. There is nothing unusual with my sqlite database. In case it has something to do with my buckett policy, below is the code. Any thoughts on the issue?

          Code:
          {
          "Version": "2012-10-17",
          "Statement": [
          {
          "Sid": "PublicRead",
          "Effect": "Allow",
          "Principal": "*",
          "Action": [
          "s3:GetObject",
          "s3:GetObjectVersion"
          ],
          "Resource": "arn:aws:s3:::hackfin/*"
          }
          ]
          }
          Thanks,
          James

          Comment


          • #6
            Hi James,

            Your ACL settings look ok. Let's review your On-device Assets manifest. Is the below snippet your manifest? If so, "https://hackfin-4uaexwweq68ihb7e3xpdqe7oihhsnuse1a-s3alias.s3.us-east-1.amazonaws.com/mcm/mcm_manifest.json" does not appear to be a SQLite database file.

            Code:
            [
                {
                    "url": "https://hackfin-4uaexwweq68ihb7e3xpdqe7oihhsnuse1a-s3alias.s3.us-east-1.amazonaws.com/mcm/mcm_manifest.json",
                    "type": "sqlite",
                    "version": 1,
                    "size": 3550
                }
            ]
            Sarah Mitchell
            Director of Customer Success | Alpha Software Corporation
            Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
            Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube

            Comment


            • #7
              If the URL code in your response is supposed to point to the sqlite database file, then the Alpha Anywhere "Define on-Device Data" tool has a bug in it. The URL specified in the json file sent to AWS and displayed (for copying) in the tool is pointing to the manifest file instead of the database file. Can you send this to the development team? I will change this on my Transform site manually and see if this does the trick.

              Thank you for all of your help.
              Thanks,
              James

              Comment


              • #8
                In Transform I tried both of the codes below and it still does not work. On AWS I have a bucket named "Hackfin". I have a "mcmdata.db" file and manifest file inside the bucket and a folder named "mcm". If I enter the manifest json directly into Transform, should it work using the code below?

                First try (url returns an error when pasted into a browser page):
                Code:
                [
                {
                "url": "https://hackfin-4uaexwweq68ihb7e3xpdqe7oihhsnuse1a-s3alias.s3.us-east-1.amazonaws.com/mcm/mcmdata.db",
                "type": "sqlite",
                "version": 1,
                "size": 3295
                }]
                [I][B][/B][/I]


                Second Try (url downloads the db file when passed into a browser page):
                Code:
                [
                {
                "url": "https://hackfin.s3.amazonaws.com/mcm/mcmdata.db",
                "type": "sqlite",
                "version": 1
                }]
                [I][B][/B][/I]


                I really thought the second try would work since I could download it independent of Transform. For the life of me I cannot figure out what I am missing.
                Thanks,
                James

                Comment


                • #9
                  The Second code try works. Turns out, even though you can refresh definitions and update on-device data, it will not update your second try code until you logout and login again. Other than that, the tools in Alpha Anywhere do not work as intended.

                  To recap, below are the steps that will work on Amazon Web Services:
                  1. Signup for Amazon Web Services (AWS) for free. Specifically, Scalable Storage (S3).
                  2. Verify root account via email. Enable MFA for better security.
                  3. Under your root login on the top right, go to "Security Credentials".
                  4. Under Access Management and Users, create a User account separate from the root account you just created.
                  5. Click on the user name you just created.
                  6. Create an optional Group to assign to this user.
                  7. Goto Security Credentials and create an access key to access AWS. Make sure and write down the public and private key if you want to use the Alpha Anywhere tools or connect to this source.
                  8. In the upper left corner, goto "Services and then "S3".
                  9. Click "Create Bucket". After naming, uncheck the box "Unblock All Public Access" and save.
                  10. Click on the newly created bucket and goto properties.
                  11. Copy the Amazon Resource Name (ARN) assigned to the bucket.
                  12. Goto Permissions and then Bucket Policy. Paste the ARN into my code below, where indicated, and paste the revised code into the AWS policy.
                  13. Go back to Amazon S3 and select Access Points.
                  14. Create Access point for your bucket with public access blocked. No need for policy here.
                  15. Go back to access points, verify it was created, and copy the access point alias for future use.
                  Code:
                  {
                  "Version": "2012-10-17",
                     "Statement": [
                     {
                     "Sid": "PublicRead",
                     "Effect": "Allow",
                     "Principal": "*",
                     "Action": [
                        "s3:GetObject",
                        "s3:GetObjectVersion"
                     ],
                  "Resource": "PASTE-HERE/*"
                  }
                  ]
                  }
                  Here is what I did in Alpha Transform and Alpha Anywhere:
                  1. Under AA tools, create a storage connection to your bucket. When you build your connection string for Amazon, you will need both keys and the access point alias from above.
                  2. Under AA tools, more, TransForm Utilities, there is an on-device data builder that you can use to create your sqlite database from scratch or by importing your tables from another source.
                  3. In the builder, generate your manifest files, upload to S3 using your storage connection, and show manifest.
                  4. Copy the manifest json displayed.
                  5. Open AlphaTransform.
                  6. Under AT home, developer options, select define on-device assets.
                  7. Paste the manifest json into the first code block.
                  8. Go back to the Amazon S3 site and your bucket. Drill down to your database file which should have a "db" file extension.
                  9. Under properties, copy the object url for the sqlite file and paste it where indicated in the code below.
                  10. The database file should download to mobile devices.
                  Code:
                  [
                  {
                     "url": "PASTE-HERE",
                     "type": "sqlite",
                     "version": 1
                  }]
                  Thanks,
                  James

                  Comment


                  • #10
                    Hi James,

                    This thread caught my because of S3.
                    Does your knowledge of S3 extend to Alpha Anywhere ?

                    Gregg
                    Gregg
                    https://paiza.io is a great site to test and share sql code

                    Comment


                    • #11
                      Hello James,

                      Turns out, even though you can refresh definitions and update on-device data, it will not update your second try code until you logout and login again.
                      Yes. You do need to log out and log in again in the form filler app for these settings to update.

                      Other than that, the tools in Alpha Anywhere do not work as intended.
                      We'll take a look. If you could email us at [email protected] with details about how you used the Define On-device Data tool in Alpha Anywhere, that will ensure that we are testing the scenario you used.
                      Sarah Mitchell
                      Director of Customer Success | Alpha Software Corporation
                      Get in the know! Join us for our Weekly Webinars: TransForm Tuesday and Wednesday's Alpha Anywhere Demo and Q&A
                      Connect with us: Instagram | Twitter | Facebook | LinkedIn | YouTube

                      Comment


                      • #12
                        madtowng, my knowledge of S3 is newbie. Been on Alpha since Windows 1 came out. I was just posting how I setup S3 for anyone trying to use Transform & S3 for the first time. The S3 help is terrible at guiding someone new to S3.
                        Thanks,
                        James

                        Comment


                        • #13
                          If starting out new to sqlite databases using Alpha TransForm and to complement my instructions above, below is the code I placed in the optional section for on-demand assets.

                          Code:
                          {
                          "policy" : {
                             "download" : {
                                "onDemand" : {
                                "checkprompt": true,
                                "confirmprompt": true,
                                "successprompt": true
                                },
                                "onLogin" : {
                                "checkprompt": true,
                                "confirmprompt": true,
                                "successprompt": true
                                }
                          
                             },
                             "delete": {
                                "onDemand" : true,
                                "onLogout" : true,
                                "onNewAccount" : true
                                }
                             }
                          }
                          Thanks,
                          James

                          Comment


                          • #14
                            Originally posted by Sarah Mitchell View Post
                            Hello James,



                            Yes. You do need to log out and log in again in the form filler app for these settings to update.



                            We'll take a look. If you could email us at [email protected] with details about how you used the Define On-device Data tool in Alpha Anywhere, that will ensure that we are testing the scenario you used.
                            I will put together a new scenario and send you the data so you can duplicate.
                            Thanks,
                            James

                            Comment


                            • #15
                              Darn. I was hoping you knew about S3 and were having trouble with the Alpha software.
                              Seems despite all their money and technology, S3 is one of the worst documented technologies
                              around.
                              Gregg
                              https://paiza.io is a great site to test and share sql code

                              Comment

                              Working...
                              X