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

Embedded Browse - Hide Column

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

    Embedded Browse - Hide Column

    I reviewed the information on "Hiding Browse Columns" in the help file. I am fairly new to Xbasic and am having problems getting the correct fieldname for my column. I would appreciate any help on my syntax!

    Error - Not found "Topparent:browse1:accounts_receivable->temp_adj"
    when trying to run the code:
    width=Topparent:browse1:accounts_receivable->temp_adj.object.width

    I have an embedded browse displaying records from my One-to-Many linked table "accounts_receivable". The field from accounts_receivable that I am displaying in the column is temp_adj.

    I have tried to refer to this column as temp_adj without the table reference and I get the same error. What is my fieldname?

    Thanks!
    Traci Wright

    #2
    Traci,

    You're passing the fieldname from the table to a method designed for objects in the form and browse.

    Instead of:
    Code:
    width=Topparent:browse1:[COLOR="Red"]accounts_receivable->temp_adj[/COLOR].object.width
    Use the column name, like this:
    Code:
    width =Topparent:browse1:[COLOR="Red"]your_column_name[/COLOR].object.width
    It's the difference between interrogating the table field directly, and in interrogating the object in your form that is displaying the field. And, remember that while the column name is the same as the field name by default it need not be, so use the actual column name. Ok?

    -- tom

    Comment


      #3
      Thanks, Tom! I think I finally figured it out. First of all you were right about the column name and I started using apply_adjustment instead of the table field name. I figured out the column name by going to the interactive code window and using the quick short cut names that it provides when you begin typing in a name.

      I also was using the wrong reference to my form. I was using Topparent and I should have been using Parentform since it is a one to many relationship.

      So, my final code was:
      width=parentform:browse1:apply_adjustment.object.width

      Thanks for your help!
      Traci
      Traci Wright

      Comment


        #4
        This is good!

        browse1:field_name.object.width = 0 'makes the column invisible
        browse1:field_name.object.width = 1 'makes the column visible as 1 inch

        Comment


          #5
          Nice touch, Neil. Works slick and is simple and easy (2 of my basic requirements!).

          Bob Arbuthnot

          Comment


            #6
            Originally posted by jdtwright
            I also was using the wrong reference to my form. I was using Topparent and I should have been using Parentform ....
            More people should be aware of the distinction between these two references. In most cases there is only one form so they refer to the same object (form) BUT...

            - Parentform refers to the form that the current object (often a button you pushed) is actually located on. If this form happens to be the only form, then it is the same as TopParent. BUT, if the current object is on an embedded form sitting on another form, then Parentform refers to the embedded form and TopParent refers to the main form.

            - TopParent is always the highest level form of all forms currently on the screen. If there is an embedded form inside another embedded form, TopParent still refers to the main form and the intermediate form would have to be referred to by name with something like TopParent:embedded_form1:Some_field.text.

            This is all described in the Help files but it's easy to overlook.

            In my opinion, 99% of the time you really only need to use Parentform because you seldom want to refer to something higher up than on the current form. Then, for those unusual situations where you do want to refer to something higher up, use the "unusual" TopParent reference. (I suspect the use of TopParent with many of the AS genies has to do with AS itself and the need to automate the construction of the script. However, when coding it myself, I find Parentform much more descriptive of what I'm actually doing.)

            Comment


              #7
              Thanks for the clarification on the difference between ParentForm and TopParent. That was helpful.

              Most projects, like Alpha Sports, have a null Menu Form which only has buttons to all the other Forms in the project. If as you said, "TopParent is always the highest level form of all forms currently on the screen," wouldn't it aways point to the null menu Form?

              Comment


                #8
                I'm sorry, I should have said "currently visible on the screen" or, perhaps more correctly, currently active. However, I'm not sure if the TopParent would truly be active when you are clicking a button in a subform so I'm not sure what the correct description is here.

                At any rate, it should be easy to see that the TopParent of Subform_1 which is on Form_A is really Form_A because another form that is open but not visible, Form_X, has no direct parent/child relationship to Form_A. A button on Form_X may have been used to open Form_A but that doesn't mean there will be any other relationship. In fact, I believe (but I haven't checked this one) it will be treated as a separate session in reference to SHARED variables. In that case, I suppose "current session" would be the correct description.

                I suppose it would be possible to give some type of name to the first form that was opened in an application then try to keep track of the relationships below it but it would be very complex; especially with a windowed (vs. maximized) application.

                Comment

                Working...
                X