Question
Shuurgan
CN
Last activity: 4 Oct 2024 5:30 EDT
Question about how the arraylist control is created
As shown in the picture, I would like to know how these two arraylist controls are made? I tried a lot of ways can only click create instance can only create the control at Int, string, boolean or object property. I need this control very much because I need to add data from the page in the arraylist. Now the design on the image is a design from another project that I found inspiration from but there is no way to create this control. Do you have any good solution for this? Thanks.
BAO
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 2 Oct 2024 13:44 EDT
Pegasystems Inc.
US
@BAOX17175074 In 19.1, the toolbar has an icon that looks like a 3d cube whose tooltip shows "Add Constructor for Type". Click this and you can create a new object in your automation. From the menu that appears when you click, you may select or type into the white area where your cursor is set the following: "System.Collections.ArrayList". This will add the Create method for this object into your automation. You can then select this object from Object Explore to acquire its Properties, Events, and Methods. In this case, you want the Add method.
In 22, there is an item in the Toolbox under the Variables section labelled "Add Constructor...". It works much the same way. Drag it out to your automation surface and then select System.Collections.ArrayList. After that, you will see it is added to your Palette for use in your automation.
Pegasystems Inc.
US
@ThomasSasnett Incidentally, the search function in 22.1 is really useful here. If you enter "ArrayList", it will filter the list of objects and allow you to select the exact one you want even if you don't know the namespace (System.Collections in this case).
Shuurgan
CN
@ThomasSasnett Thank you. I have successfully created the arraylist control, but I would like to see this type of control used by other automation in a different automation. For example, if I want to call the lstSiteName control that I just created in 200 in 400, or any other control, how can I change it so that they can use each other? BAO
Pegasystems Inc.
US
@BAOX17175074In 19.1, you can make the component global in scope and then refer to it from another automation. You do this by right-clicking the object in the component tray and selecting "Make Global". In 22.1, you can select the item from the Palette and move to Globals.
Shuurgan
CN
Shuurgan
CN
@ThomasSasnett I would also like to ask how the break control for forloop and listloop is created? BAO
Pegasystems Inc.
US
@BAOX17175074 In 19.1, the loop objects do not appear in Object Explorer. In 22.1, they do appear in the Palette, so you can select them from there to access the loop control's break method. In 19.1 however, the only way to see the Properties, Methods, and Events (PMEs) for the loop controls is to actually select them within the automation. Once you click on the control in the automation, you can then access its PMEs from Object Explorer.
Shuurgan
CN
Pegasystems Inc.
US
@BAOX17175074 That is a method of the control "forLoopSiteName". Select that control (the actual loop) in your automation and then in Object Explorer, you can see its PMEs. You can select the Break method from there.
Shuurgan
CN
@ThomasSasnett I'm sorry, I don't really understand. How do I find the PME as shown in the picture? BAO
Pegasystems Inc.
US
Shuurgan
CN
@ThomasSasnett thanks for your help. BAO
Pegasystems Inc.
GB
@BAOX17175074 If your issue is resolved could we ask that you click the 'Accept Solution' against the reply which helped answer you main question?