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

Need Help With Conditional Expression

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

    Need Help With Conditional Expression

    I have a client-side conditional expression on an image in a list component but it is not working.
    There are 3 conditions that I need to test and have the expression set up like this:

    1. data.QUANTITY == 0 (RED)
    2. data.QUANTITY <= data.MINQTY && data.QUANTITY > 0 (YELLOW)
    3. data.QUANTITY > data.MINQTY (GREEN)

    Condition 1 always seems to work but condition 2 & 3 are have somewhat random results.
    ie) Where QUANTITY = 13 and MINQTY = 2 the image should be GREEN but is YELLOW.

    Is there something wrong with my expression syntax?
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    #2
    Re: Need Help With Conditional Expression

    Are you sure the quantities are being evaluated as numbers? If they were characters, then 13 is before 2.

    Pat
    Pat Bremkamp
    MindKicks Consulting

    Comment


      #3
      Re: Need Help With Conditional Expression

      Pat's got it. In your List control, for Quantity and MinQty, set the Transform Data Type to 'ToNumber'.

      Comment


        #4
        Re: Need Help With Conditional Expression

        Originally posted by Pat Bremkamp View Post
        Are you sure the quantities are being evaluated as numbers? If they were characters, then 13 is before 2.

        Pat
        Pat, hmm they are definitely numeric values. But that made me think, and in the list builder fields tab there's an option to Transform Data Type, where I noticed this ... all list data are srting values:

        TransformData.png

        However, I have tried both ToNumber and ToNumberSimple transformations and I still get the same wrong results. I'm wondering if this might be a bug.
        Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

        Comment


          #5
          Re: Need Help With Conditional Expression

          Originally posted by Davidk View Post
          Pat's got it. In your List control, for Quantity and MinQty, set the Transform Data Type to 'ToNumber'.
          David, I posted my reply to Pat before I saw your response, but it's not working. I'll try to build a simple test case.
          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

          Comment


            #6
            Re: Need Help With Conditional Expression

            Using Static data... but should be the same. What Alpha Release/Build are you using?

            ListCondImages.PNG
            Attached Files

            Comment


              #7
              Re: Need Help With Conditional Expression

              I'm seeing the correct results with Static Data but not with SQL Data

              Static Data.png SQL Data.png

              Using build 3730_4695
              Last edited by iRadiate; 09-02-2016, 12:41 PM. Reason: added build version
              Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

              Comment


                #8
                Re: Need Help With Conditional Expression

                Just added QUANTITY and MINQTY to my MySQL tblCustomers table. These fields show up as (N) in the List Field tab, but still need to be converted ToNumber or ToNumberSimple for the condition to work.

                This is the section you're in... isn't it? I'm using a more current pre-release than you. If you want to post a sample test ux and table I'll have a look.

                ListCondImages2.PNG

                Comment


                  #9
                  Re: Need Help With Conditional Expression

                  David, yes that is the section.
                  I've attached the component but I'm not sure you will be able to test it. I can't send the entire database and I don't know how to extract just the table that the component is bound to.

                  Thanks,
                  Stephen
                  Attached Files
                  Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


                    #10
                    Re: Need Help With Conditional Expression

                    I don't know how to extract just the table that the component is bound to
                    if you are using mysql or sqll server you can right click on the table in navicat or any other tools you are using then dump the table as sql file and attach it .
                    thanks for reading

                    gandhi

                    version 11 3381 - 4096
                    mysql backend
                    http://www.alphawebprogramming.blogspot.com
                    [email protected]
                    Skype:[email protected]
                    1 914 924 5171

                    Comment


                      #11
                      Re: Need Help With Conditional Expression

                      Originally posted by GGandhi View Post
                      if you are using mysql or sqll server you can right click on the table in navicat or any other tools you are using then dump the table as sql file and attach it .
                      Thank you Ghandi. In SSMS I think I was able to generate the script to create the required table.
                      Attached Files
                      Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                      Comment


                        #12
                        Re: Need Help With Conditional Expression

                        With your quantity and minqty fields set to ToNumber, I don't see an issue. I messed around with the icon to see if that was an issue, but using CSS Icons or SVG it's ok.

                        Your table was empty... and the List had a join to suppliers... so I had to edit all that.

                        I also edited down your UX for a simpler test. You should provide as simple a UX as possible... otherwise it's just a lot of time trying to get stuff to run in an environment it wasn't built in.

                        ListCondImages3.PNG

                        Comment


                          #13
                          Re: Need Help With Conditional Expression

                          David, I understand and thank you for taking the time to look at my component.
                          I find I run into this situation way more than I would like .. ie, I will submit a bug report to Alpha and they can't duplicate the problem. They actually have a copy of my entire database and application because in some situations that is the only way they could see the issue.

                          Thanks again for looking and I apologize if I made it more difficult than it should have been. I certainly don't mean to waste your time. I will keep hammering away at this, there must be a reason it's not working for me.
                          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                          Comment


                            #14
                            Re: Need Help With Conditional Expression

                            I meant to attach the version I tested with. I've tested this under the official release 3670 4684 and and the current pre-release and it's ok. You'll need to test with another version to see if an issue was introduced into 3730 that was subsequently corrected.
                            Attached Files

                            Comment


                              #15
                              Re: Need Help With Conditional Expression

                              So, I fired up your test version under build 3809_4719 and latest pre-release build 3816_4722, hooked back into my database, and it still does not work :-(

                              Build 3809_4719.jpg Build 3816_4722.jpg

                              In the database, the results are numeric values

                              SQL Design.jpg

                              And the data fields are numbers

                              SQL Data.jpg
                              Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                              Comment

                              Working...
                              X