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

Programatically Open a UX by Name/Alias

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

    Programatically Open a UX by Name/Alias

    No luck finding a relevant thread on this topic. Appreciate it if someone can point me in the right direction.

    Most of our system reports have a popup ux used to set filters and to run the report call. Each ux is report specific with filtered pulldowns etc.

    If I have an sql based grid listing all report names, could I also store a reference to the report specific ux and then open it from the grid?

    For clarity each row of the grid would open a different UX.

    #2
    Not sure if this would help but I have a reports table that acts like a lookup table. Then based on the values on my UX I lookup what report to pull. I'm using Reportal with Crystal Reports but I would think the process could work with other reporting applications.

    Never take a ride to the edge of your mind unless you've got a ticket back - Jon Oliva - Savatage.

    Comment


      #3
      I know very little about Grids, but you could build a list that has all of the report names, then put a button on each with a JavaScript Action that would open it's respective report.

      Comment


        #4
        You can in fact open a UX from a grid. Then that UX can open a report. I'm headed out the door right this moment otherwise I'd write a sample for you. Maybe once I am back.
        Mike Brown - Contact Me
        Programmatic Technologies, LLC
        Programmatic-Technologies.com
        Independent Developer & Consultant​​

        Comment


          #5
          Thank you everyone.

          cavj1 it sounds like the reverse of what I am trying to do but interesting never the less!

          Russell Craycraft Thats indeed the objective but whether using list or grid, I need each grid/list row button to first open a report specific config ux. Theoretically this would be based on a reference to the component stored in the same table.

          mikeallenbrown I think perhaps your answer is similar to Russells. Opening the same UX from each report row is not an issue. Problem bit is opening a different report specific ux for each report row

          Comment


            #6
            Originally posted by ChristopherG View Post
            Thank you everyone.

            mikeallenbrown I think perhaps your answer is similar to Russells. Opening the same UX from each report row is not an issue. Problem bit is opening a different report specific ux for each report row
            I see now. When the UX is opened pass the report reference you have in your grid into a UX argument. Using a JavaScript run the report you need in the UX.

            Short Video Demo: https://drive.google.com/file/d/1Pev...ew?usp=sharing

            I uploaded the sample components here and SQL script with data.
            Attached Files
            Mike Brown - Contact Me
            Programmatic Technologies, LLC
            Programmatic-Technologies.com
            Independent Developer & Consultant​​

            Comment


              #7
              Without getting too involved, I'd guess {dialog.object}.getParentObject() or {dialog.object}.getTopParentObject() would be quite useful.
              If you want to avoid the mess of grid row, {dialog.object}.setStateInfo['<variable name>'] will be quite helpful.
              Gregg
              https://paiza.io is a great site to test and share sql code

              Comment


                #8
                Just to clarify, are you just wanting a report that has a list with all report names, and then a way to open the report? See below image:
                image.png
                I'm a visual person, so if you could provide any images or a quick drawing even of what you want that'd allow me to be more helpful. ​

                Comment


                  #9
                  mikeallenbrown

                  The principle structure of your code is correct, but ommits the tricky bit. I need each grid row to open a different ux, one specific to the report listed in the row.

                  For this to work I will have to know the Alias (or ID) of each report specific UX (see 'ReportUXName' field below) and programatically use it to open the component. This is important because reports typically use diverse filters and each need their own UX.

                  Below is an amended version of your db design:

                  Code:
                  
                  USE [SandBox]
                  
                  GO
                  
                  /****** Object:  Table [dbo].[reports]    Script Date: 1/27/2024 9:18:21 AM ******/
                  
                  SET ANSI_NULLS ON
                  
                  GO
                  
                  SET QUOTED_IDENTIFIER ON
                  
                  GO
                  
                  CREATE TABLE [dbo].[reports](
                  
                  [ID] [int] NOT NULL,
                  
                  [CustomerName] [nvarchar](100) NULL,
                  
                  [ReportName] [nvarchar](50) NULL,
                  
                  [ReportUXName] [nvarchar](50) NULL,
                  
                  PRIMARY KEY CLUSTERED
                  
                  (
                  
                  [ID] ASC
                  
                  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
                  
                  ) ON [PRIMARY]
                  
                  GO
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (1, N'Customer A', N'REPORT1', N'rep_1_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (2, N'Customer B', N'REPORT2', N'rep_2_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (3, N'Customer C', N'REPORT3', N'rep_3_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (4, N'Customer D', N'REPORT4', N'rep_4_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (5, N'Customer E', N'REPORT5', N'rep_5_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (6, N'Customer F', N'REPORT6', N'rep_6_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (7, N'Customer G', N'REPORT7', N'rep_7_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (8, N'Customer H', N'REPORT8', N'rep_8_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (9, N'Customer I', N'REPORT9', N'rep_9_ux')
                  
                  INSERT [dbo].[reports] ([ID], [CustomerName], [ReportName]) VALUES (10, N'Customer J', N'REPORT10', N'rep_10_ux')
                  
                  GO
                  ​

                  Comment


                    #10
                    Originally posted by Russell Craycraft View Post
                    Just to clarify, are you just wanting a report that has a list with all report names, and then a way to open the report? See below image:
                    image.png
                    I'm a visual person, so if you could provide any images or a quick drawing even of what you want that'd allow me to be more helpful. ​
                    Russell Craycraft in principle yes but not to open the report directly, rather to open a report specific ux with filters. That UX in turn will open the report.

                    Comment


                      #11
                      Originally posted by madtowng View Post
                      Without getting too involved, I'd guess {dialog.object}.getParentObject() or {dialog.object}.getTopParentObject() would be quite useful.
                      If you want to avoid the mess of grid row, {dialog.object}.setStateInfo['<variable name>'] will be quite helpful.
                      madtowng thank you I'll take a look

                      Comment


                        #12
                        Essentially is comes down to the question:

                        Is it possible to store a reference to a specific Alpha Component in an sql table column, display the sql table in an AA grid, and then open the referenced component programatically, using a button in the grid row.

                        Comment


                          #13
                          I don't think you need the UX name in a database. I mean, you could do that if you want.


                          Grid Button

                          Ashampoo_Snap_Sunday, January 28, 2024_8h55m11s.png


                          Grid Javascript Actions
                          Each action would open a separate UX.

                          Ashampoo_Snap_Sunday, January 28, 2024_8h55m39s.png
                          Mike Brown - Contact Me
                          Programmatic Technologies, LLC
                          Programmatic-Technologies.com
                          Independent Developer & Consultant​​

                          Comment


                            #14
                            Christopher,
                            Are you using javascript actions to open the different UX components ?
                            Are you planning to use data from the grid for the reports ?
                            Gregg
                            https://paiza.io is a great site to test and share sql code

                            Comment


                              #15
                              The quick answer is yes, you can open a grid programmatically based on a value in a grid.
                              You can even reference data from the grid without needing to know the grid alias.
                              The code below is from one of my UX components that is opened from a grid.

                              Code:
                              js = <<%txt%
                              
                              
                              var parentPTR = {dialog.object}.getParentObject();
                              var topPTR = {dialog.object}.getTopParentObject();
                              var vbPTR = parentPTR.getControl('search_items_VB');
                              var custID = parentPTR.getValue('hiddenfkclients')
                              var filteredArray = [];
                              
                              topPTR.stateInfo['masterItems'] = JSON.parse(topPTR.stateInfo['masterItems'])
                              {dialog.object}.stateInfo['newItem'] = <itemJSON>;
                              topPTR.stateInfo['masterItems'].push({dialog.object}.stateInfo['newItem'][0])
                              parentPTR.stateInfo['localItems'] = topPTR.stateInfo['masterItems'];
                              
                              
                              filteredArray = parentPTR.stateInfo['localItems'].filter( (cust) => {
                                  //if(Number(cust.seq) >= 670){debugger;}
                                  return  cust.fkclient == custID
                              })
                              parentPTR.stateInfo['filteredCustItems'] = filteredArray;
                              
                              topPTR.stateInfo['masterItems'] = JSON.stringify(topPTR.stateInfo['masterItems'])
                              vbPTR.populate(filteredArray,false,false );
                              //parentPTR.showContainerWindow(ele,'SEARCH_ITEMS');
                              //gebugger;
                              parentPTR.setValue('partnum',_d.PARTNUM);
                              {dialog.object}.buttonClick('CLICKCLOSE');
                              parentPTR.setFocus('QUANTITY')
                              %txt%​
                              Gregg
                              https://paiza.io is a great site to test and share sql code

                              Comment

                              Working...
                              X