I am using Oracle Forms. I want to know how to determine which tab the user is on at run time.
For example: I have created four tabs in my canvas A,B,C,D. At run time, how do I get to know which tab is currently being accessed by the user?
With
Get_Item_Property(:system.cursor_Item, ITEM_CANVAS)
you can get the canvas name of the item. This will return the name of the tab control page. If you use the following command with this name:
GET_CANVAS_PROPERTY(canvas_name,TOPMOST_TAB_PAGE);
you will get the name of the tab that is activated at this moment
Related
I have a piece of automation that uses a handful of links to traverse to a required new tab. Once that tab is open, another set of rules handles how to utilize it. The problem is the site I am using has completely different names for each tab that is opened this way. I have tried attaching the browser with just a "*" for the HTML title (in hopes that it grabs the most recent active tab), but this doesn't seem reliable. I know you can capture the browser instance and pass it around as a parameter, but I haven't seen where I can grab the instance of the newly opened tab.
To maybe make this easier to follow:
attach browser
click a bunch of links
final link opens a new tab, with essentially a random title
another piece of code needs to pickup where the last one left off
so if I can either get the instance of the new tab to pass to the second set of code, or a way to attach the new tab to second set of code without the use of the "title"
I hope this makes sense. Any help is appreciated.
As I have understood, you have a browser, with a website. On that page you click on links to open them in new tabs. So far so good. Now you would like to switch to these new tabs.
So as there is no way to solve this in UiPath, I could think about a workaround that works in any browser without any plugin.
Steps to solve it:
Having all new tabs opened and the base tab is active in your browser
Get the tab title via Get Attribute activity and save it as String variable MainTabTitle
Now add a Do While loop
In the loop you add the following things:
If you use Firefox, add the Hotkey CTRL+Tab, this will let you go to the next tab
Add a Get Attribute activity (that extracts the title of the tab)
Save the name into a Dictionary or something similar with an Assign activity
Do this until you reach the first tab again (you can determine the first tab with checking your MainTabTitle)
Then at the end of the Do While loop you now have the logic:
We should have now all the tabs (except the first) in the Dictionary
Now take the title of the first entry of that Dictionary
That title is now used as the Attach browser scope that you need to use to give the tab the focus
That's it. I would say a proper way to solve this.
I have an application in Microsoft project that performs a Backtrace of a task and then uses the following to save that image to an Excel Tab
Application.EditCopyPicture Object:=False, ForPrinter:=0, SelectedRows:=0, FromDate:=EarliestStart, ToDate:=LFin, ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
definitions for msome of the variables used in the procedure:
EarliestStart = StatusDate-30
Lfin = Finish of the target Task for the Backtrace, which would be the last task in the string.
I use a flag field to identify tasks that I want to create a backtrace for and then cycle through all the tasks to create the Backtrace images and saving them to a unique excel tab.
Every so often, my app "creates a secondary task pane" using the same view that I am using in the top half of the split screen. I do not want a split screen with the bottom half of the screen displayed. When I have a split screen, my application
Is there a vba command that I can use in code that will test for the presence of a secondary task pane and if present, clear it. I have been looking for something that would test the Ribbon task\details checkbox but have been unable to find it.
If before running the application I remove the secondary pane, it runs fine. If I start to run the vba with a secondary pane showing, it brings up a View "View" dialog.
I have experimented with:
ViewApplyEx SinglePane:=True, ApplyTo:=1
but this displays the View"Views" dialog and forces me to select a view from the list, which is not what I want to do.
Any suggestions as to where I should look?
The method you are looking for is PaneClose. It will close the lower pane of the active window. It does nothing if the lower pane was already closed. So do this:
Application.PaneClose
Application.EditCopyPicture Object:=False, ForPrinter:=0, SelectedRows:=0, FromDate:=EarliestStart, ToDate:=LFin, ScaleOption:=pjCopyPictureShowOptions, MaxImageHeight:=-1#, MaxImageWidth:=-1#, MeasurementUnits:=2
Is there a good way to achieve similar dynamic tab in XAML like in Edge browser where tabs are added dynamically? I know that the Pivot can be used for static tabs. More specifically, I need a solution that accounts for situation when there are too many tabs.
An Hoa,
Follow these,
Create a grid with two row definitions.
First row definition is to create controls like
Second row definition is to create a empty layout.
In the first row definition, create a stack panel and add a grid inside it with textblock to display the website name for ex.
Create a + button.
On click of + button, create a same grid with text block and add the control as child element to the stack panel which is present inside the first row definition.
Follow the same for empty layout also which is present in the second row definition.
The Windows Community Toolkit now offer support of this control:
The documentation for this new controls is located here:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.ui.controls.tabview?view=win-comm-toolkit-dotnet-stable
And some code samples are located here:
https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TabView
I want to create a global button for all the entities.
I tried the following:
Created a sample solution with entity Application Ribbon
Opened the Application Ribbon Entity in Ribbon Workbench
Under Command Bar -> Home . Placed a button besides New Record
However after publish I am not able to view the button.
How do I resolve this?
The answer is from Mithilesh Kumar, and can be found on this page:
https://community.dynamics.com/crm/f/117/t/155542
You need to find the Group where you want to show the Button.
If you want to show on the Home Page for all Entity, find the Group as below and place the Button in this Group.
If you want to show in the Forms of all Entity, you need to place in the Group in the Form Area, shown below
Hope that clarifies
Modifying the XML you need to rely on the {!EntityLogicalName} keyword inside the location.
You can find a tutorial here:
http://blog.webfortis.com/adding-global-ribbon-buttons-for-all-entities-in-dynamics-crm
I'm developing a module for openerp v7.
I've defined a workflow and in my view defined a form with a notebook which contain as tabs as status defined in workflow.
In every tab i've a button which triggers the change of status of the workflow. All of this works like a charm!
The problem I am facing is that when the button triggers the workflow status change, the status changes but the tab marked as active is not changed, as far i know this is the expected behaviour, but i would like to change the active tab when the status of workflow changes and i didn't find any way to do it.
INFO: According to the DOCS there is a way of doing this with the fields:
default_focus: set to 1 to put the focus (cursor position) on this field when the form is first opened. There can only be one field within a view having this attribute set to 1 (new as of 5.2)
But no way with pages...
Any help would be very appreciated.
I think that making a tab to be active is not the expected behavior with a workflow. Normally, buttons are putted in the header next to the statusbar, and each button have the "states" attribute to define those status they must appear in (according with the "state" field of the model).
If you want to show/hide some information (say field, group, page, etc) according to the workflow status, you can use the "attrs" parameter with the "invisible" option restricted to a domain over a "state" field value.
If you want to use JavaScript, you can use this to focus a tab page:
$('.oe_notebook #ui-id-3').click()
Where ui-id-3 is the 1 based index of the tab page. Here it would be the third page. Works in v8, can't tell for other versions. Hope it helps anyway :)