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 hide row, per record

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

    #16
    Edward,

    No, that's not it! I read that topic beforehand. That will hide the particular FIELD, not the row. The row will still exist along with its label.
    Steve Wood
    See my profile on IADN

    Comment


      #17
      hi Steve
      i you want to do this and you cant find another way
      you could use a bit of javascript
      just a thought
      martin
      regards

      martin
      www.jollygreenthumb.com

      Comment


        #18
        Steve,

        In a previous post you said a "row" was a field, so what is the problem?

        -ed

        Comment


          #19
          I've had to say "row" a lot in this conversation. But I believe you are referring to where I said "[a row] is the projection of the field value, along with its label".
          Steve Wood
          See my profile on IADN

          Comment


            #20
            Originally posted by Steve Wood
            I've had to say "row" a lot in this conversation. But I believe you are referring to where I said "[a row] is the projection of the field value, along with its label".

            Have you tried to use

            .field_info[1].Column.Hide = iif(pseudo code to exclude)

            concept in the filtering section?

            Comment


              #21
              Steve,

              If it is really that important, and not just a "nice to have" feature, and as long as you only want to display one record at a time, then you could do it by going through an intermediate page that looks at the data and sets session variables to the record values. Then in your display page, filter on the session variables to hide the rows.

              I use the following filter in the filter section of a page to hide columns based on session variable values. If the column heading is blank, then the column is hidden.

              Code:
               
              with tmpl_Pe_List
               componentName = "Pe_List"
              '==== Add a filter and hide blank columns ====
               .DBF.filter = "Li_Id=" + s_quote(session.Li_Id)
               for x=1 to 12 
               field_info[x+3].column.heading=session.PL[x]
               if alltrim(session.PL[x])=""
                field_info[x+3].column.hide=.t.
               end if
               next
              '==== end of filter and hide ====
              You could do the same thing by going first to a code only page that reads the values in the row, assigns them to session variables, then redirects to your display page which if filtered by the session variables.

              Pat
              Pat Bremkamp
              MindKicks Consulting

              Comment


                #22
                Re: conditional hide row, per record

                I realize that this is an old thread, but I came across it while trying to accomplish the exact same thing that Steve described. In case anyone else is trying to find the answer to this problem, I thought I'd share what I've come up with.

                1. Select the field that you want to be conditionally displayed, and change the control type to custom. Put your conditional statements in the Custom Control Properties definition. For example:

                Code:
                'Write Xbasic code here that returns the HTML to be displayed by this control
                select
                    case data.Msg_date=""
                	Msg_date_render = <<%html%
                	%html%
                
                    case data.Msg_date<>""
                	Msg_date_render = <<%html%
                	{Msg_date}
                	%html%
                
                end select
                2. Insert conditional code in the row label. For example:

                Code:
                <div align="right">
                <%a5
                select
                    case data.Msg_date<>""
                	? "Date"
                end select
                %>
                </div>
                Using this approach, the row will disappear if the Msg_date field is empty. However, there will be an extra dividing line where the row would have been. It's not perfect, but suitable for me.

                I should also note that this was done in version 8. I can't say whether or not it will work in v7.

                Nathan

                Comment


                  #23
                  Re: conditional hide row, per record

                  Many thanks I'll give it a go. A rule on this, working the way field rules work with a calculated field would be the answer.
                  Insanity: doing the same thing over and over again and expecting different results.
                  Albert Einstein, (attributed)
                  US (German-born) physicist (1879 - 1955)

                  Comment


                    #24
                    Re: conditional hide row, per record on a grid - solved

                    I have managed to do just what I want by using field rules in the table.

                    Example:

                    Say I want to display the current url of an entry, make it avalable to edit and be able to use it as a link all at the same time.

                    Normally you would assign a static text link like email, view. The problem is this would appear even if there was no link (no data within the field being linked to), so what to do?

                    In my table I have a field called {primaryweb} that contains the web address I wish to use, I also have (what I call) a shadow {webshadow} field the same attributes. I then have a third field called {weblick} that's six characters long (the display link).

                    The shadow filed is a calulated field, if the {primaryweb} field is <> "", then the shadow filed populates with the data in the {primaryweb} field e.g. (IF(PRIMARYWEB <> "",PRIMARYWEB,"")).

                    The {weblick} field is also a calculated field, it depends on the {webshadow} field being <> "", e.g. (IF(WEBSHADOW <> "","Visit","").

                    To make this work in the grid, all that is needed is to use the shadow field as a linked {webshadow} field, with the webclick field as the "Display what in the link? - Value from another field, being {weblink}, and link address type is "Field value is link address".

                    You can also use the {primaryweb} field on the same grid for editing the data if required.

                    Also works for conditional image links.

                    IF(LOGO=.T.,ALLTRIM("\media\logo\ ")+ ALLTRIM(STR(ID)) +"."+ LOGOTYPE,"\media\logo\none.jpg")

                    Hope people find this of assistance.

                    Peter
                    Insanity: doing the same thing over and over again and expecting different results.
                    Albert Einstein, (attributed)
                    US (German-born) physicist (1879 - 1955)

                    Comment

                    Working...
                    X