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

Specific UX Component search based on html URL

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

  • Specific UX Component search based on html URL

    Hey Guys,

    So I've created this handy dandy sales map:

    https://snap.scansourcesecurity.com/sales_map.htm

    I have a database of sales people. One of the fields in the database is region (which will be US state). Rather than create a UX component for each state, I want to create one UX component for all states. Is there a way that based on some kind of url, I can go to the UX component, but filter by state?

    For example, let's say somebody clicks on Texas. I ultimately want that URL to take the person to my UX component, but I want that UX component to be filtered to only show Texas. If they click on South Carolina, I want the URL to go to the same UX component, but I want it to only show sales reps in South Carolina.

    Does that make sense? If I really have to, I guess I could create a UX component for each state, but I'm trying to avoid that. Thanks.

  • #2
    Re: Specific UX Component search based on html URL

    Yes, look at request.variables().

    This assumes the UX is data bound

    The javascript you would need to create the url in the parent object which I am assuming would be the sales map with the state valuable might look something like what you see below.

    The javascript I provided assumes you will be using alpha to get the value of state and create the variable. I am sure if you are writing your own custom javascript to accomplish this, this should still give you the general idea.

    Code:
    var v_state={dialog.Object}.getValue('STATE');
    window.location.href='YOUR_UX.a5w?state='+v_state
    Then in the child ux, in the server side onDialogInitialize event you might use something like what you see below to load the record into the child ux.

    Code:
    id=Request.Variables.state
    
    'Create the server side action script to populate Dialog with Data from One or More Table(s)
    
    ExecuteServerSideAction("Populate Dialog from Tables::PopulateData")
    Then you would configure the server side action script to use the variable we created as the ID. This may not fit your use case exactly but maybe this is enough to get you started.

    ss_action_script.png

    Comment


    • #3
      Re: Specific UX Component search based on html URL

      You can build a list with all your data in the format you wish to display. Then filter that list based upon the clicking of a state.

      This would use one UX and filter the list based upon states.
      Once you have this list you can then do what you need with the data.


      Alpha makes all of this very simple. You just need your map to return the state, say 'MA', and then use that to filter the list.

      Michael

      Comment


      • #4
        Re: Specific UX Component search based on html URL

        Thanks for the feedback everyone. I will look at both of these options.

        Comment


        • #5
          Re: Specific UX Component search based on html URL

          Ok, so if my field is named region, I would go into list properties, go to filter, and set up a list of expressions?

          I'm a little fuzzy on exactly how this works. I entered:

          data.Region == 'TX'

          which did filter and only show me Texas records. So how do I create an expression based on this that shows Texas based on my map URL, and how do I create the URL so that it says 'TX'?

          Thanks!

          Comment


          • #6
            Re: Specific UX Component search based on html URL

            When you click the map you need it to return TX then you filter your list for 'TX'.

            So first alert("TX"); Once you have this you can then build any page you want. Either set the list control to display all the info in you database, for TX, one record at a time or if you have too much info just show the relevant info to enable the user to choose one person, then You can click on that row and build a new page with all your info.


            Michael

            Comment


            • #7
              Re: Specific UX Component search based on html URL

              Hey Michael,

              Thanks again for the feedback. Unfortunately I am such a noob at this, I'm not sure I am following what you mean. Could you give more specifics on creating a URL that would return "TX",? So for example, my URL that goes to my UX component would be: https://snap.scansourcesecurity.com/sales.a5w

              What change do I make to that so it results in "TX" as far as the UX is concerned?

              And then as far as the filter, what would the specific expression be that would tell it to show TX if that is triggered by the URL?

              Sorry, I'm sure what you are saying would make perfect sense to someone with a little more experience.

              Thanks,

              Comment


              • #8
                Re: Specific UX Component search based on html URL

                I probably need a sample list of sales people.
                An example of what the final screen should look like and how you are storing the data you want to display.

                Also the whole reply is based upon you having access to the onClick event in the map.


                I am travelling for the next few days so it will be Wednesday before I could build an example. I have a 12 hour flight on Monday so it would be good to fully understand by then.

                Comment


                • #9
                  Re: Specific UX Component search based on html URL

                  I've attached my UX component and my sales database which has a couple of sales reps in it. Basically, I want to display a list of sales reps from a database. When you click on a sales rep, it takes you to a detail page which shows their picture, and a button to call them, email them, or return back to the main page.

                  You mentioned onclick events on that map, that could be an issue. I only have the ability to link each state to a regular URL. Does that make what I'm trying to do impossible? My hope was that there is some way to modify the URL for each individual state in such a way that it tells the UX component to filter by that state.

                  sales_info.zip
                  UX.zip

                  Comment


                  • #10
                    Re: Specific UX Component search based on html URL

                    The normal way is www.salesrep.a5w?=TX

                    We can then pickup the TX and filter a list grid or build one standalone page to display data.

                    passing page variables in this way has security implications.

                    I will look at this by Wednesday.


                    Michael

                    Comment


                    • #11
                      Re: Specific UX Component search based on html URL

                      Could you send me a spreadsheet of the sales info as I have never used dbf tables.

                      You should consider SQL if this database is going to be large.

                      Comment


                      • #12
                        Re: Specific UX Component search based on html URL

                        Ok, I've attached an Excel spreadsheet for the database. It is just a few entries right now while I do testing.

                        Thanks again for looking at this.


                        SALES_INFO_EXCEL.zip

                        Comment


                        • #13
                          Re: Specific UX Component search based on html URL

                          Hi,

                          did you solve this topic. if you solve this please can you send me Component and sample database.

                          BR

                          Comment


                          • #14
                            Re: Specific UX Component search based on html URL

                            This is how we do it.

                            I can help along these lines, but we use the map in Alpha.


                            I have given you a login

                            User name Carl
                            Password Alpha1234


                            The screen shots may help you understand.

                            Message board reply.pngMessage board reply 2.pngMessage board 3.png

                            Comment


                            • #15
                              Re: Specific UX Component search based on html URL

                              But rather stupidly no URL http://smg.datadrivensystems.co.uk/sl_secure/



                              I am travelling now will be back in the UK wednesday

                              Comment

                              Working...
                              X