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

Conditional Object

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

    Conditional Object

    I'm creating a conditional object in a letter form which states:

    iif(Ship="Y",Shipname,iif(isblank("Title"),Trim(First_Name)+" "+Trim(Last_Name),Trim(Title)+" "+Trim(First_Name)+" "+Trim(Last_Name)))

    When I click on the Evaluate Button, it shows the correct information but when I try to give it a Label name it states the error message "Filter Expression Not Logical".

    It worked in A4! Any suggestions?

    Basically it checks the character field "Ship" for a Y to then put in the shipping name. If its a N, then it uses the Title, First_Name and Last_Name character fields for its information. All the fields in the expression are character fields.

    Thanks!

    #2
    RE: Conditional Object

    Arthur,

    The expression seems valid to me which explains why the expression builder accepts it. However, it is not a *logical* expression, that is, it does not evaluate to logical .t. or .f. You correctly state that it yields a string the contents of which are conditional upon the values of "ship" and "title."

    You do not state where you want to use the expression but it seems as if you want to use it to define a condition in the properties of a conditional object. In this place you indeed need a logical expression such as

    ship=.t. .and. isblank("title")

    In other words, you build the condition into the layers of the object rather than into the string to be displayed.

    Of course, you could dispense with the conditional object and define a calculated field which you define with the expression in your post. That way you would have your contionality without a conditional object.

    Bill
    Bill Hanigsberg

    Comment


      #3
      RE: Conditional Object

      Bill,

      I created Calculated Fields and it appears to work except for two problems:

      1. Its showing the records twice in the letters (two letters for each record)

      2. And if there's no Company name, it shows a blank line. That was one of the reasons I was interested in a Conditional Object to remove the blank line if there was no Company name.

      Comment


        #4
        RE: Conditional Object

        Arthur,

        For things like address blocks you should look into a rich text object. I could run it down for you but I would just be repeating the clear instructions you will find in the manual.

        It shows how to make a soft line break so that blank fields (like your company name) will not leave spaces.

        Note that (at least on reports) you can place a rich text object on a layer of a conditional object. And you can define a calculated field and place it in a rich text object. It is easy to appreciate that, in combination, these three devices provide tremendous flexibility.

        I use them to output multiple bibliographic formats which must accomodate many more conditionalities than even the most complicated address.

        So press on.

        Bill
        Bill Hanigsberg

        Comment


          #5
          RE: Conditional Object

          Bill,

          Unfortunately, even though I have the complete manual printed out, I'm still having a problem understanding those clear instructions you speak of. Do you know of anywhere on the Internet that may show a graphic explanation of it?

          Thanks for your input.

          Comment


            #6
            RE: Conditional Object

            Arthur,

            You wrote, "Do you know of anywhere on the Internet that may show a graphic explanation of it?"

            Yes, I do. Right here.

            Frame a specific question and someone will answer. If all else fails attach a sample file.

            For the present issue, why not step back and frame a statement of the problem. As I understand it you want to print an address in a letter. You want it to be the address fields in the ship to fields of your table. But if ship to is false then you want to send to some other address fields. In these fields, company may be blank and if so then you want the layout to adjust.

            If I am approximately correct, create a conditional object.
            The expression of the first layer is
            ship = .t.

            Place appropriate fields on this layer.

            The second layer has an expression of
            Ship = .f.

            On this layer place a rich text object. Place your fields on this object and put company on a separte line. Separate the address lines by "ctrl-enter" rather than a simple "enter" to ensure that any blank lines will be supressed.

            If missing fields are a possibility you may want to use a rich text object on layer 1 as well.

            Does this get you started?

            Bill
            Bill Hanigsberg

            Comment


              #7
              RE: Conditional Object

              Arthur, I think my friend Bill meant SHIFT ENTER, not CTRL ENTER.

              The former creates a soft line break and prevents the blank space if a field on a line in the rtf object is empty. The later inserts a page break, which would appear on screen as a dotted line.

              Rich text objects are explained pretty thoroughly in chapter 9 of the User's Guide, beginning at pg. 123

              -- tom

              Comment


                #8
                RE: Conditional Object

                Bill,

                I changed the Ship character field to a logical field. I then created a conditional object based on Ship=.f.

                I then created a Rich Text Object and placed the name field and company field below it separated with a Shift Enter for a soft return.

                When I view the letter form, company names are at the top of the letter head and names are at the bottom of the letter head.

                I'll keep trying to figure this out - thanks for your help!

                Comment


                  #9
                  RE: Conditional Object

                  Thanks Tom

                  Comment


                    #10
                    RE: Conditional Object

                    Progress is slow but I am making progress. I have converted my Ship field back to a character field and created calculated fields which I have placed in my Rich Text Object. They appear to be working well with the expection the Rich Text Object moves down the page with each passing record. Any way I can make that stay in the Letter Head area ?

                    Thanks!

                    Comment


                      #11
                      RE: Conditional Object

                      If your 'top of page' is drifting, you might embed a page eject (form feed) in a page footer. There are probably more elegant ways to force the next page to begin at top but this has worked for me before. -- tom

                      Comment


                        #12
                        RE: Conditional Object

                        Tom,

                        Are you referring to the Page Break from the Tool Box? If so, I've been trying to put it in the Page Footer but its not staying. Must I put it in some type of Rich Text Object?

                        Also, just to let you know, I am having success with conditional Rich Text Object in both the Letter Head and the body of the letter!

                        Thanks!

                        Comment


                          #13
                          RE: Conditional Object

                          Tom,

                          This letter is for and 8 1/2 X 11 sheet of paper. I noticed in the design mode that if I dragged the bottom of the sheet to make it an 8" length, I get my page breaks.

                          Your thoughts on this please!

                          Comment


                            #14
                            RE: Conditional Object

                            Tom,

                            I've been able to maintain my top of page by transferring my information from the Letter Head to a Page Header and then removing the Letter Head. The only problem I have now is when I Print Preview the letters, the body of the letter slowly creeps down with each page viewed.

                            Any suggestions on that? I have a Page Header, Body and Page Footer.

                            Thanks again!

                            Comment


                              #15
                              RE: Conditional Object

                              Tom,

                              Your friend Bill did indeed mean ctrl-enter. Apologies Arthur.

                              Bill
                              Bill Hanigsberg

                              Comment

                              Working...
                              X