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

Field to display "blank" If....

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

    Field to display "blank" If....

    Hello

    I have been playing with several things and cannot for the life of me get this to work. I have a field which calculates based on a "time" calculation. If the beginning time and end time are not entered the field displays "-.05", this is because it should deduct 30 minutes based on the entries.

    Anyway -
    I'm wanting to add a display "blank" if it is equal to "-.05"
    I know you can change in the format tab to display blank if nothing.

    I tried to enter the calculation
    ((TOSECONDS(Inv_Test->Outime)-TOSECONDS(Inv_Test->Intime))/3600)-.5
    and add a If statement ----If (val(NoTimeEntry>-.05,"") I had set a variable called NoTimeEntry on the field - but I don't think I'm on the right track.

    Any clues?
    G

    #2
    You left out many details in your question,

    I have a field which calculates based on a "time" calculation
    is this calculated field in a table or wherever you want to "display" the time value such as a report.

    I'm wanting to add a display "blank"
    display on a form, report, what?

    An if() construction has the structure if(logical condition, true result, false result). Your indicated attempt has only the first result.

    If your current calculated field yields "-:05" then you need a calculated field for the display something like

    if(left(calculated time field,1)="-","",calculated time field)
    There can be only one.

    Comment


      #3
      Originally posted by Stan Mathews
      You left out many details in your question,
      is this calculated field in a table or wherever you want to "display" the time value such as a report. display on a form, report, what?
      An if() construction has the structure if(logical condition, true result, false result). Your indicated attempt has only the first result.
      If your current calculated field yields "-:05" then you need a calculated field for the display something like
      if(left(calculated time field,1)="-","",calculated time field)
      I'm sorry to leave anything out Stan.
      The field is within a form and a report.
      It displays -.50 on both if the user doesn't enter the intime/outtime.
      I wanted to get rid of the clutter on the form/report and just show "blank"

      See attached pic.

      George
      Last edited by czar_g; 06-02-2006, 03:25 PM.

      Comment


        #4
        It appears that waittime is a table field, calculated, some expression - though you say it is "within the form and report". Your attachment seems to be a screenshot of an area of a browse.

        A possible calculated field for your form/report for display instead of waittime would be

        if waittime < 0,"",alltrim(str(waittime)))
        There can be only one.

        Comment


          #5
          Your right Stan it is a screen shot of a browse.
          I tried to go into the calculation and add what you suggested but it keeps telling me it's invalid. I have the same calculation defined in one of my reports.

          IE
          WaitTime=((TOSECONDS(Inv->Outime)-TOSECONDS(Inv->Intime))/3600)-.5
          WaitTime= if WaitTime < 0,"",alltrim(str(WaitTime))

          Thanx
          George

          Comment


            #6
            "I tried to go into the calculation and add what you suggested" - I didn't give you anything to add to your present expression. My suggestion was a new calculated field for the form and or the report that you would place instead of waittime, for display purposes. The expression

            if waittime < 0,"",alltrim(str(waittime)))

            would display "" - empty string if waittime is less than zero

            or the value in waittime if is it is greater than zero. That is based on the screen shot you posted where it appears that waittime is numeric.

            You also said at one time - I'm wanting to add a display "blank" if it is equal to "-.05"

            There is a difference between -.05 and "-.05". If the waittime field is character then if(left(waittime,1)="-","",waittime) would be the expression for the new calculated field.
            There can be only one.

            Comment


              #7
              Originally posted by Stan Mathews
              "I tried to go into the calculation and add what you suggested" - I didn't give you anything to add to your present expression. My suggestion was a new calculated field for the form and or the report that you would place instead of waittime, for display purposes. The expression if waittime < 0,"",alltrim(str(waittime))) would display "" - empty string if waittime is less than zero or the value in waittime if is it is greater than zero. That is based on the screen shot you posted where it appears that waittime is numeric.
              You also said at one time - I'm wanting to add a display "blank" if it is equal to "-.05" There is a difference between -.05 and "-.05". If the waittime field is character then if(left(waittime,1)="-","",waittime) would be the expression for the new calculated field.
              OK - I believe I'm following you - BUT
              When I try and create a new calculated field it tells me invalid expression.
              I'd tried to go in and edit it by placing

              if calc->Waittime<0,"",alltrim(str(calc->Waittime)))

              Same thing - it's drivin me nutso

              G

              Comment


                #8
                Example is attached

                Since you don't seem to want to attach a sample of your tables I've constructed an example with a report that displays the calculated wait time if it is greater than zero and leaves the calculated wait time blank if it is less than zero.

                Hopefully this will demonstrate how it can be done and you can apply it to your files.
                Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
                There can be only one.

                Comment


                  #9
                  Originally posted by Stan Mathews
                  Since you don't seem to want to attach a sample of your tables I've constructed an example with a report that displays the calculated wait time if it is greater than zero and leaves the calculated wait time blank if it is less than zero. Hopefully this will demonstrate how it can be done and you can apply it to your files.
                  UPDATE: HOPE THE LIGHT FROM THE BULB DIDN'T BURN YOU - LOL
                  I just added the IF code to the calculation xy and called it a new field (NWAIT)
                  Then it allowed me to eliminate the waitime column and performed the calcs and displayed blank like it was supposed to.. I didn't know it would do this.. duh.


                  I'm so sorry Stan - I didn't know you may want a copy of my tables. It contains 10K+ records... I appreciate your sample provided and I see how it is to be done. It will work with the reports but the form has the Waittime field displayed.
                  I was hoping with the addition it would display blank. It would seem I need both fields in order for the "blank" field to be true. If I delete the column "waittime" it no longer works.

                  I suppose they will see the -.50 in the field.. lol

                  Thank you
                  George
                  Last edited by czar_g; 10-17-2005, 12:10 PM.

                  Comment


                    #10
                    With form display and browse display

                    If you create and save a named browse it can take the place of your embedded browse. Saved browses, forms, and reports can have calculated fields.

                    Example attached.
                    Last edited by Stan Mathews; 03-28-2006, 03:24 PM.
                    There can be only one.

                    Comment

                    Working...
                    X