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

IsBlank() for Conditional Style?

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

    IsBlank() for Conditional Style?

    I know this is probably simple, but I can't seem to make it work.

    I have several fields on a grid. If the fields are blank, I want them highlighted in yellow. Once the user enters data, they can go back to plain white, or another color.

    I'd prefer to do this at the client-level, but the javascript threw me, so I decided to do it at the server-level.

    But even here I am confused. My field is called "Location01," and I want it to go yellow if it is empty. I know the conditional style must be in logical format, but how do I say

    isblank(Location01)

    and keep it logical?
    Attached Files
    Last edited by Rich Hartnett; 07-23-2014, 09:29 PM.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

    #2
    Re: IsBlank() for Conditional Style?

    Rich,

    The functions in the client side expression are xbasic functions that Alpha knows how to translate into js, you cannot use js expressions in there (you can call js functions defined in the js functions part of the grid though)
    So use for example
    Code:
    alltrim(location01)=""
    IsBlank() is not a js function anyway
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

    Comment


      #3
      Re: IsBlank() for Conditional Style?

      And if you were doing it in xbasic the isblank() function requires the field name be quoted so it would be


      isblank("Location01")
      There can be only one.

      Comment


        #4
        Re: IsBlank() for Conditional Style?

        Originally posted by Stan Mathews View Post
        And if you were doing it in xbasic the isblank() function requires the field name be quoted so it would be


        isblank("Location01")

        Thanks Stan. I tried it with the quotes but I still get an error message:

        Error executing conditional formatting code. Check to see that all fields referenced in conditional expressions are included in the Grid and that all conditional expressions are valid. Error reported was: No such field
        Sergeant Richard Hartnett
        Hyattsville City Police Department
        Maryland

        Comment


          #5
          Re: IsBlank() for Conditional Style?

          Sgt. You probably do not want to do this on the server-side. If you were server side on a web based app your field name would need to be something like "DataSubmitted.Location01", just depends what embed you are in when you try to access that field. Franks suggestion works. Just remember to include a second condition that will change the field back to no background. Remove the server side conditional and import the following to the client-side conditional:


          alltrim(Location01) = ""||/*SIMPLE STYLE*/background: #ffff67;|#|{text: '',function: ''}
          alltrim(Location01) <> ""||/*SIMPLE STYLE*/background: none;|#|{text: '',function: ''}

          I started a recent discussion on client-side conditional styles:
          Remove inline background color for button previously set by client-side conditional style

          Comment


            #6
            Re: IsBlank() for Conditional Style?

            Hi Rich and thanks (to everyone) for helping me out with this.

            When I use your client-side conditional, I get an error message.

            (See attached screen shot)

            Did I enter something wrong?
            Attached Files
            Sergeant Richard Hartnett
            Hyattsville City Police Department
            Maryland

            Comment


              #7
              Re: IsBlank() for Conditional Style?

              Sgt. I see the copy and paste into your client-side expression did not work. The vertical pipe symbol got replaced with {pipe}. I attached a picture of my test app, where I set background color on 'Firstname' field.
              Attached Files

              Comment


                #8
                Re: IsBlank() for Conditional Style?

                Sgt., BTW, If you, or your users use different styles (like that Android Dark style I think you were looking at) where the background is not white then make sure that setting the background to "none" actually works to clear the yellow. I would think it would work, but I'm always finding little surprises. Like the problem I posted the other day about getting gradient buttons to go back to their normal appearance after temporarily adjusting their background color and image.

                Comment


                  #9
                  Re: IsBlank() for Conditional Style?

                  That was it Rich!!

                  I guess where I was fumbling originally was in not understanding how to make it a "logical" expression, but now I understand how to do it, thanks to your excellent detailed examples.

                  And BTW, I am using Gradient Blue, but I know what you mean about having issues with the gradient background colors. I've had problems with them since they first came out!

                  Rich Hartnett
                  Sergeant Richard Hartnett
                  Hyattsville City Police Department
                  Maryland

                  Comment


                    #10
                    Re: IsBlank() for Conditional Style?

                    Hey Rich let me ask you one more question .................

                    I have decided that I want the field to be Yellow when it is blank. (To point out that the day is open.)

                    Then I want it to turn Blue when it has been reserved by one of our employees, whom will be entering their ID number starting with "100" and going up.

                    And lastly I want it to turn Red when that day is not available to anyone, by entering "XX" in the field. I tried the format pictured below, and the Yellow and Blue colors change correctly, but it does not change to Red when "XX" is entered?
                    Attached Files
                    Sergeant Richard Hartnett
                    Hyattsville City Police Department
                    Maryland

                    Comment


                      #11
                      Re: IsBlank() for Conditional Style?

                      Sgt. Try the following four conditions (in the order listed, well at least the "1=1" condition must be last)):

                      Code:
                      1) alltrim(Firstname)  
                      2) toNumber(word( Firstname,1, " " )) > 0 and len(word( Firstname,1, " " )) = 3
                      3) upper(word( Firstname,1, " " )) = 'XX'
                      4) 1 = 1
                      Those conditions are for the following backgrounds. 1) Yellow, 2) blue, 3) red and 4) "none". The, " ", parameter on the 'word' function sets the separator to look for between words, it can probably be omitted here, but I wanted to show it, just incase you should need it for something. Notice the second condition that checks for an employee id checks that the ID is exactly 3 characters as well as being numeric. You might have to change that if that was a bad assumption.

                      Comment


                        #12
                        Re: IsBlank() for Conditional Style?

                        Rich those worked like a champ!

                        Once again, thank you very much for your help.
                        Sergeant Richard Hartnett
                        Hyattsville City Police Department
                        Maryland

                        Comment

                        Working...
                        X