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

JavaScript Library

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

  • JavaScript Library

    Is anyone "really" using the js glossary? I have been starting to use it more and more, but curious to what others are doing. I'm willing to share my export as well.

    Things I have found out:
    -Easy to import.
    -Easy to export.
    -Combine xbasic and js into 1 for easy export and import?
    -Set it up as global.

  • #2
    How can I learn more about it?
    David Weinstein
    Best Tech
    [email protected]t

    Comment


    • #3
      Use it all the time, very helpful and time saving
      Glen Schild



      My Blog

      Comment


      • #4
        besttech,

        Go to your JavaScript Functions, Right Click, select Edit Glossary.

        Import the below if you want (Globally means it will work in all apps in Alpha, not just the current one), then type "message", or "sett" (No quotes, and must be at the start of a line).

        [
        {
        "term": "refresh",
        "replacement": "{dialog.object}.refreshListData(<^>);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "refresh List"
        },
        {
        "term": "run",
        "replacement": "{Dialog.object}.runAction('<^>');<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Run Action JavaScript"
        },
        {
        "term": "Enter",
        "replacement": "if (event.keyCode == 13) {<n><t>{Dialog.object}.buttonClick('<^>');<n>}<n>",
        "show": true,
        "word": false,
        "first": false,
        "description": "Key 13"
        },
        {
        "term": "Close",
        "replacement": "{dialog.Object}.closeContainerWindow(this);<n>",
        "show": true,
        "word": false,
        "first": false,
        "description": "Close Window"
        },
        {
        "term": "db",
        "replacement": "debug(1)<n>",
        "show": false,
        "word": false,
        "first": true,
        "description": ""
        },
        {
        "term": "setv",
        "replacement": "var lObjSource = {Dialog.Object}.getControl('List')<n>var rowNumTarget = lObjSource._selectedRow;<n><t><t>var BarcodeId = lObjTarget.getData(rowNumSource).BarcodeId;<n><t><t> {Dialog.Object}.setValue('textbox_BarcodeId', BarcodeId);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Set Value"
        },
        {
        "term": "trans",
        "replacement": "var _html = '<<>div style="display:inline-block;">INSERT MESSAGE HERE<^><<>/div>';<n>var _options = {<n><t>"className": "",<n><t>"style": "box-shadow: 0px 2px 6px 2px rgba(0,0,0,.25);background: rgba(0,0,0,.8);color: #fff;border: 1px solid rgba(0,0,0,.8);border-radius: 4px;",<n><t>"close": {<n><t><t>"show": true,<n><t><t>"icon": "svgIcon=#alpha-icon-x:icon{fill: #fff}",<n><t><t>"iconHover": "svgIcon=#alpha-icon-xCircle:icon{fill: #fff}"<n><t>},<n><t>"duration": 5000,<n><t>"animation": {<n><t><t>"show": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>},<n><t><t>"hide": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>}<n><t>}<n>};<n>{dialog.object}.transientMessage('bottom-left',_html,_options);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Transient Message"
        },
        {
        "term": "aja",
        "replacement": "{dialog.object}.ajaxCallback('','','<^>','','',{chunkedResponses: {allow: false},deviceOfflineFunction: function() { }});<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "AJAX Callback"
        },
        {
        "term": "getch",
        "replacement": "var listObj = {dialog.object}.getControl(<^>);<n>listObj.getCheckedRows();<n><t><n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Get Checked Rows"
        },
        {
        "term": "message",
        "replacement": "A5.msgBox.show('MyTitle','<<>div style="height: 1in; padding: 15pt;">My custom message<<>/div>',[{name: 'ok', html: 'OK', value: 'ok'},{name: 'cancel', html: 'Cancel', value: 'cancel'}],function(button) {if(button == 'ok') {<n>setTimeout(function() {},10)<n><t>}<n><t><t>if(button == 'cancel') {<n><t><t><t>setTimeout(function() {},10)<n><t>}<n>});<n><t>$('A5dlg0.TITLE.TOOLS').style = 'visibility: hidden';<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "a5 Message Box"
        },
        {
        "term": "PanelSet",
        "replacement": "{dialog.object}.panelSetActive(<^>',true);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Set Panel Active"
        },
        {
        "term": "deb",
        "replacement": "debugger;<n><n>",
        "show": false,
        "word": false,
        "first": true,
        "description": ""
        },
        {
        "term": "buttonc",
        "replacement": "{Dialog.object}.buttonClick(<^>);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "ButtonClick"
        },
        {
        "term": "if",
        "replacement": "<t>if {<n><t><t><^><n><t><t>}<n><t>else {<n><t><t><n><t><t> }<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "if/else"
        },
        {
        "term": "dia",
        "replacement": "{Dialog.object}.<^><n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "{Dialog.object}"
        },
        {
        "term": "loop",
        "replacement": " (let i=0; i <<> value.length; i++)<n>",
        "show": true,
        "word": false,
        "first": false,
        "description": "i=0; i < value.length; i++"
        },
        {
        "term": "get",
        "replacement": "{Dialog.object}.getValue(<^>);<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Get Value"
        },
        {
        "term": "sett",
        "replacement": "setTimeout(function(){<n><t><^><n>},500)<n>",
        "show": true,
        "word": false,
        "first": true,
        "description": "Set Timeout"
        }]

        Comment


        • #5
          glenschild,

          I am trying to build mine up, would you be interested in exporting all, or even listing a few you find very helpful?

          I was working with setting the insertion points in the few I do have, but this is still new for me, and I change them as I see fit. Kind of a learn the process before changing the process approach to what I have built.

          Comment


          • #6
            That is really kind of you, Russell, that has expanded my very poor collection.

            I had to delete the trans and message entries to get the JSON to be recognised by alpha, I thing there are '}' missing possibly cut off by the formatting here as they are so large.

            ll the others work brilliantly and are very helpful.

            Comment


            • #7
              The insertion points really add to this feature. Here are some more for you.

              [
              {
              "term": "today",
              "replacement": "var today = new Date();<n>{dialog.object}.setValue('<^>',today);<n>",
              "show": false,
              "word": false,
              "first": false,
              "description": ""
              },
              {
              "term": "msg1",
              "replacement": "var cname = {dialog.object}.getValue('company_name');<n>var _html = '<<>div style="line-height:20px; text-align: center; display:inline-block;">'+ cname +'<<>br><^><<>/div>';<n>var _options = {<n><t>"className": "",<n><t>"style": "box-shadow: 0px 2px 6px 2px rgba(0,0,0,.25);background: rgba(0,102,0,.8);color: #fff;border: 1px solid rgba(0,0,0,.8);border-radius: 4px;",<n><t>"offset": {<n><t><t>"major": "4"<n><t>},<n><t>"close": {<n><t><t>"show": false,<n><t><t>"icon": "svgIcon=#alpha-icon-x:icon{fill: #fff}",<n><t><t>"iconHover": "svgIcon=#alpha-icon-xCircle:icon{fill: #000}"<n><t>},<n><t>"duration": 5000,<n><t>"animation": {<n><t><t>"show": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>},<n><t><t>"hide": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>}<n><t>}<n>};<n>{dialog.object}.transientMessage('top-right',_html,_options);<n>",
              "show": false,
              "word": false,
              "first": true,
              "description": ""
              },
              {
              "term": "xb",
              "replacement": "{dialog.object}.ajaxCallback('','','<^>','','',{deviceOfflineFunction: function() { }});<n>",
              "show": false,
              "word": false,
              "first": true,
              "description": ""
              },
              {
              "term": "rc",
              "replacement": "var _d = this.selectionData[0];<n><n>var obj = {dialog.object}.getControl(<^>);<n>obj.populate(_d);<n>",
              "show": false,
              "word": false,
              "first": false,
              "description": ""
              },
              {
              "term": "vb",
              "replacement": "{dialog.object}.refreshViewBoxData(<^>);<n>",
              "show": false,
              "word": false,
              "first": true,
              "description": ""
              },
              {
              "term": "bc",
              "replacement": "{dialog.object}.buttonClick(<^>);<n>",
              "show": false,
              "word": false,
              "first": false,
              "description": ""
              },
              {
              "term": "rv",
              "replacement": "var data = {dialog.object}.getValue('<^>');<n>{dialog.object}.populateControlsFromTable(data,false,'','<<>Default>','<<>Default>',{"showWaitMessage": false});<n>",
              "show": false,
              "word": false,
              "first": false,
              "description": ""
              },
              {
              "term": "sf",
              "replacement": "{dialog.object}.setFocus(<^>);<n>",
              "show": false,
              "word": false,
              "first": false,
              "description": ""
              },
              {
              "term": "rl",
              "replacement": "{dialog.object}.refreshListData(<^>);<n>",
              "show": false,
              "word": true,
              "first": true,
              "description": ""
              }]

              Glen Schild



              My Blog

              Comment


              • #8
                Wow, this is amazing, didn't know it existed or forgot. Will definitely be a time saver for me. Thanks!
                David Weinstein
                Best Tech
                [email protected]t

                Comment


                • #9
                  There was a JSON error on my last export. I am attaching a new one below. (This one also has a delete row in it. I add a button in lists that say "Delete" to delete rows without users needing to use the in-place or in-line edit options that are a little clunky in my opinion.)

                  ps. I used https://jsonlint.com/ for a JSON validator to find the error.

                  [
                  {
                  "term": "refresh",
                  "replacement": "{dialog.object}.refreshListData(<^>);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "refresh List"
                  },
                  {
                  "term": "delete",
                  "replacement": "//Delete the current row in the List<n>var lObj = {dialog.object}.getControl('list1');<n><t>lObj.deleteRow({prompt: true});<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Delete Row"
                  },
                  {
                  "term": "run",
                  "replacement": "{Dialog.object}.runAction('<^>');<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Run Action JavaScript"
                  },
                  {
                  "term": "Enter",
                  "replacement": "if (event.keyCode == 13) {<n><t>{Dialog.object}.buttonClick('<^>');<n>}<n>",
                  "show": true,
                  "word": false,
                  "first": false,
                  "description": "Key 13"
                  },
                  {
                  "term": "Close",
                  "replacement": "{dialog.Object}.closeContainerWindow(this);<n>",
                  "show": true,
                  "word": false,
                  "first": false,
                  "description": "Close Window"
                  },
                  {
                  "term": "db",
                  "replacement": "debug(1)<n>",
                  "show": false,
                  "word": false,
                  "first": true,
                  "description": ""
                  },
                  {
                  "term": "setv",
                  "replacement": "var lObjSource = {Dialog.Object}.getControl('List')<n>var rowNumTarget = lObjSource._selectedRow;<n><t><t>var BarcodeId = lObjTarget.getData(rowNumSource).BarcodeId;<n><t><t> {Dialog.Object}.setValue('textbox_BarcodeId', BarcodeId);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Set Value"
                  },
                  {
                  "term": "trans",
                  "replacement": "var _html = '<<>div style="display:inline-block;">INSERT MESSAGE HERE<^><<>/div>';<n>var _options = {<n><t>"className": "",<n><t>"style": "box-shadow: 0px 2px 6px 2px rgba(0,0,0,.25);background: rgba(0,0,0,.8);color: #fff;border: 1px solid rgba(0,0,0,.8);border-radius: 4px;",<n><t>"close": {<n><t><t>"show": true,<n><t><t>"icon": "svgIcon=#alpha-icon-x:icon{fill: #fff}",<n><t><t>"iconHover": "svgIcon=#alpha-icon-xCircle:icon{fill: #fff}"<n><t>},<n><t>"duration": 5000,<n><t>"animation": {<n><t><t>"show": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>},<n><t><t>"hide": {<n><t><t><t>"type": "auto",<n><t><t><t>"duration": 600<n><t><t>}<n><t>}<n>};<n>{dialog.object}.transientMessage('bottom-left',_html,_options);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Transient Message"
                  },
                  {
                  "term": "aja",
                  "replacement": "{dialog.object}.ajaxCallback('','','<^>','','',{chunkedResponses: {allow: false},deviceOfflineFunction: function() { }});<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "AJAX Callback"
                  },
                  {
                  "term": "getch",
                  "replacement": "var listObj = {dialog.object}.getControl(<^>);<n>listObj.getCheckedRows();<n><t><n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Get Checked Rows"
                  },
                  {
                  "term": "message",
                  "replacement": "A5.msgBox.show('MyTitle','<<>div style="height: 1in; padding: 15pt;">My custom message<<>/div>',[{name: 'ok', html: 'OK', value: 'ok'},{name: 'cancel', html: 'Cancel', value: 'cancel'}],function(button) {if(button == 'ok') {<n>setTimeout(function() {},10)<n><t>}<n><t><t>if(button == 'cancel') {<n><t><t><t>setTimeout(function() {},10)<n><t>}<n>});<n><t>$('A5dlg0.TITLE.TOOLS').style = 'visibility: hidden';<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "a5 Message Box"
                  },
                  {
                  "term": "PanelSet",
                  "replacement": "{dialog.object}.panelSetActive(<^>',true);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Set Panel Active"
                  },
                  {
                  "term": "deb",
                  "replacement": "debugger;<n><n>",
                  "show": false,
                  "word": false,
                  "first": true,
                  "description": ""
                  },
                  {
                  "term": "buttonc",
                  "replacement": "{Dialog.object}.buttonClick(<^>);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "ButtonClick"
                  },
                  {
                  "term": "if",
                  "replacement": "<t>if (<^>) {<n><t><t><n><t><t>}<n><t>else {<n><t><t><n><t><t> }<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "if/else"
                  },
                  {
                  "term": "dia",
                  "replacement": "{Dialog.object}.<^><n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "{Dialog.object}"
                  },
                  {
                  "term": "loop",
                  "replacement": " (let i=0; i <<> value.length; i++)<n>",
                  "show": true,
                  "word": false,
                  "first": false,
                  "description": "i=0; i < value.length; i++"
                  },
                  {
                  "term": "get",
                  "replacement": "{Dialog.object}.getValue(<^>);<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Get Value"
                  },
                  {
                  "term": "sett",
                  "replacement": "setTimeout(function(){<n><t><^><n>},500)<n>",
                  "show": true,
                  "word": false,
                  "first": true,
                  "description": "Set Timeout"
                  }]

                  Comment

                  Working...
                  X