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

x_Dialog Tab Stops

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

    #31
    Re: x_Dialog Tab Stops

    Apologies, I meant to just remove the alltrim)()

    Comment


      #32
      Re: x_Dialog Tab Stops

      OK, so I actually did go to an xml browse and it works fine. everything aligns properly.

      Now I have an issue with the BrowseObj1_Browse_definition filter.

      We need to show the browse for ALL requests, or for only those that aren't acted on (approved= "Y" or "N")

      I am using this code to define the filter and order for the browse. What I am trying to achieve is that if the sup_resp or the adm_resp is Blank, then display the records, else, don't.
      The string "filt" needs to be in Quotes in the browse definition.
      Code:
       elseif "Supervisor"$vWhich	 
      	dim vwkr as N = val(alltrim(word(vWorker,1)))
      	filt = "Sup_Id = [varN->vWkr]"
       elseif "Department"$vWhich	 
      '	dim vwkr as N = val(alltrim(word(vWorker,1)))
      	filt = "Adm_Id = [varN->empid]"
        else
        	dim vwkr as N = val(alltrim(word(vWorker,1)))
      	filt = "Emp_Id = [varN->vWkr]"
      end if
      if vTYPE="Pending"
      	if "Supervisor"$vWhich .or. "Employee"$vWhich	
      		filt=filt+".and. Sup_Resp="+chr(92)+"\"\\""
      	elseif "Department"$vWhich	  
      		filt=filt+".and. Adm_Resp="+chr(92)+"\"\\""    [COLOR="#FF0000"] 'filter becomes Adm_Id = 433.and. Adm_Resp=\"\"[/COLOR]
      	end if
      end if
      filt = replace_parameters(filt,local_variables())
      ord = "E_date" 
      
      'Browse Definition:
      %code%
      browseObj1_browse_definition = <<%xml%
      <browse gridline_horizontal="yes" gridline_vertical="yes" data_entry_style="default" row_height="16" filter="__ans_t__" order="__v_ord__" >
      <code>
      
      'Now, display the Xdialog substituting the Filter and order into the definition string
      browseObj1_browse_definition = strtran(browseObj1_browse_definition,"__v_ord__",ord) 'replace variable placeholder for order
      browseObj1_browse_definition = strtran(browseObj1_browse_definition,"__ans_t__",Filt) ' replace variable placeholder for filter
      
      [COLOR="#FF0000"]'which becomes: <browse gridline_horizontal="yes" gridline_vertical="yes" data_entry_style="default" row_height="16" filter="Adm_Id = 433.and. Adm_Resp=\"\"" order="E_date" >�<code>�	<OnRowDblClick>script_play_local("Dlg_appr_Time_off"[/COLOR]
      
      ui_dlg_box(dlg_title,dlg_body,dlg_event)
      When I do the substitution, I get an error "expected value", and I can't figure out why.

      Tom

      Comment


        #33
        Re: x_Dialog Tab Stops

        Got it!

        Instead of trying to delimit the Quotes("), I changed to a single quote(') and all seems to work properly.

        Code:
        if vTYPE="Pending"
        	if "Supervisor"$vWhich .or. "Employee"$vWhich	
        		filt=filt+".and. isblank('Sup_Resp')"
        	elseif "Department"$vWhich	  
        		filt=filt+".and. isblank('Adm_Resp')"
        	end if
        end if
        see attached.

        time_off.jpg

        Comment


          #34
          Re: x_Dialog Tab Stops

          Using the xml definition for the browse works very well... EXCEPT

          I can display the time off requests for an individual employee, for a specific date, for a range of dates, and for an administrator's department.
          However, when I want to display a specific Supervisor's employees, the '' in the dialog title blows up the entire thing and i wind up with the default browse instead. I have tried using the "chr(39)" int the definition of the title. I have tried doing a strtran of a non-offending character string to the ' the title at the very end of the browse. I've tried delimmitting it with a "\". All to no avail. I even went back to the browse definition and tried to use the following "Time off Requests for Scott Modery's Department" as the title of the dialog using the advanced browse tool to create an xdialog with embedded browse, which, when run displays the default browse.

          Does anyone have an idea as to how to put an ' in an xdialog browse title?

          I know it seems like a small thing, but I am really trying to make this a very slick looking project, and I just spent DAYS trying to find out why the defined browse wasn't showing.

          Frustrated Tom

          Comment


            #35
            Re: x_Dialog Tab Stops

            I must be misunderstanding something.


            Image 2.png
            There can be only one.

            Comment


              #36
              Re: x_Dialog Tab Stops

              Stan,

              Are you using a default browse, and not a custom browse layout?

              The default will work fine, it is just the custom one that is having a problem. see attached.

              Tom

              browses.jpg

              see code below
              Code:
              DIM Filt as C = ""
              DIM ord as C = ""
              if "Day"$vWhich
              	filt = replace_parameters("Req_Date = [varD->vReq_date]",local_variables())
              	dlg_title = "Time Off Requests for "+date_format(vReq_date,"Weekday, Month dd, yyyy") +"  in the Department"
               elseif "Range"$vWhich
              	filt = replace_parameters("between(Req_Date,[varD->vReq_date1],[varD->vReq_date2])",local_variables())
              	dlg_title = "Time Off Requests between "+date_format(vReq_date1,"Weekday, Month dd, yyyy") +" and "+ date_format(vReq_date2,"Weekday, Month dd, yyyy")+" in the Department"
              
               elseif "Supervisor"$vWhich	 
              	vWkr = val(alltrim(word(vWorker,1)))
              	Dim vSup_name as C = alltrim(word_subtract(vWorker,word(vWorker,1)))
              	dlg_title = "Time Off Requests for "+w_upper(lower(vSup_name))+"[COLOR="#FF0000"]'s [/COLOR]Department"
              	filt = "Sup_Id=[varN->vWkr]"
               elseif "Department"$vWhich	 
              	dlg_title = "Time Off Requests for the Department"
              	filt = "Adm_Id=[varN->empid]"
                else
                	vwkr = val(alltrim(word(vWorker,1)))
              	Dim vWkr_name as C = alltrim(word_subtract(vWorker,word(vWorker,1)))
              	dlg_title = "Time Off Requests for "+w_upper(lower(vWkr_name))
              	filt = "Emp_Id=[varN->vWkr]"
              end if
              if vTYPE="Pending"
              	if "Supervisor"$vWhich .or. "Employee"$vWhich	
              		filt=filt+".and. isblank('Sup_Resp')"
              	elseif "Department"$vWhich	  
              		filt=filt+".and. isblank('Adm_Resp')"
              	end if
              end if
              DIM filt1 as C = replace_parameters(filt,local_variables())
              Last edited by Tom Henkel; 06-03-2015, 03:23 PM. Reason: added code

              Comment


                #37
                Re: x_Dialog Tab Stops

                As I said, I was misunderstanding.

                Substitute ` (Grave Accent chr(96)) and see if anyone notices.
                There can be only one.

                Comment


                  #38
                  Re: x_Dialog Tab Stops

                  I'm now thinking that this is some sort of xml issue.

                  In the body of the definition, special characters (<, > )are defined as &lt; or &gt;. sample: "&lt;default&gt;"

                  maybe there's a "special character" definition for " ' "

                  Comment


                    #39
                    Re: x_Dialog Tab Stops

                    Originally posted by Tom Henkel View Post
                    I'm now thinking that this is some sort of xml issue.

                    In the body of the definition, special characters (<, > )are defined as < or >. sample: "<default>"

                    maybe there's a "special character" definition for " ' "
                    &#8217

                    http://www.ascii.cl/htmlcodes.htm
                    Andrew

                    Comment


                      #40
                      Re: x_Dialog Tab Stops

                      I'm sure you know better then I, but does that apply to xml as well as html?
                      There can be only one.

                      Comment


                        #41
                        Re: x_Dialog Tab Stops

                        Thanks, I'll give that a shot &#33;

                        Tom

                        Comment


                          #42
                          Re: x_Dialog Tab Stops

                          Originally posted by Stan Mathews View Post
                          I'm sure you know better then I, but does that apply to xml as well as html?
                          I only know what google tells me I can know :)

                          &apos

                          http://xml.silmaril.ie/specials.html
                          Andrew

                          Comment


                            #43
                            Re: x_Dialog Tab Stops

                            If the Supervisor's name ends in an "s", you have another grammatical problem to deal with...

                            If you word the dlg_title a bit differently, you can avoid the 's or ' altogether:

                            "Time off requests for Department: "+dept_var+" Supervisor: "+sup_var
                            Last edited by MoGrace; 06-03-2015, 05:18 PM.
                            Robin

                            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                            Comment


                              #44
                              Re: x_Dialog Tab Stops

                              Tom.
                              You're burning over this.
                              Go back and look at the sample in post #14
                              Keep the dialog title as "Bergen County..." however you originally showed it.
                              A dialog title is reused as part of XML code as well as dialog addressing and should not be used (in my experience) for expansive messages or anything but a simple title.
                              Below that see where I used (as you had in your very early example) "Review your time off requests;" and replace that with whatever you like !! It looks very respectable with standardized title across all the time-off XMLs
                              Try that code out, in minutes you will see.

                              Comment


                                #45
                                Re: x_Dialog Tab Stops

                                Maybe I'm just standing on principals, but I should be able to put whatever I want in a title. This particular dialog would be available to both the supervisor(Scott Modery) and the administrator above him. I want ot have the title as descriptive as possible.

                                Comment

                                Working...
                                X