How to get the name of correlation item in OM through event processing scripts?
I am trying to write a groovy script in OM event processing scripts, I want that script to read the event correlation and set custom attributes accordingly. I am unable to read the correlation item. Please guide me how to get it? What method should I use to get the correlation item? I am using OPR library.
Hi there,
the name property would be the correct attribute to get the subform name, just by looking at the code it doesn't seem like it's doing the right thing
I am assuming that you send Main in the function countChk() which would look something like this
countChk(Main);
And you probably want to make sure you are entering the right subform so you need to keep that loop at the end of the function
but if you want to get through all the checkboxes inside that subform you must do a loop through that node to find each checkbox
I am assuming that the function would probably look something like this
function countChk(vNode) {//Starts vNode with Main
for (var i = 0; i < vNode.nodes.length; i++) {
if (vNode.nodes.item(i).className === "field") {
if (vNode.ui.oneOfChild.className === "checkButton") {
if (vNode.items.nodes.length > 1) {
if (vNode.value.oneOfChild.value == 1) {
nChk++ ;
}else if (vNode.nodes.item(i).className === "subform"){
if (vNode.nodes.item(i).name === "Door_Subform"){
countChk(vNode.nodes.item(i));
}//endloop
Hope this help!
Similar Messages
-
How to get the name of the current tab.
Hi Experts,
I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
Thanks in advance.
Regards,
Arun1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
2. Declare an Import Parameter in this method
Tab type String.
3. This parameter has value of the selected TAB.
4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
wd_this->Att = Tab.
Att is the attribute created by you in Attributes Tab of View. ( of type String)
5. Now the selected Tab ID is stored in this Attribute Att.
6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
Data : lv type string.
lv = wd_this->Att
Now lv has your selected TAB ID.
I hope it would help you.
Edited by: Saurav Mago on Oct 13, 2009 2:22 PM -
How to get the name of a Data Element of a generic Table!
Hi guys!
In my function i have the following import paramenter
i_outtab type standard table
now i import a table and i want to get the dataelement of the fields.
is there a way to do this??Hello Thomas
Perhaps the following sample report may be useful for you.
*& Report ZUS_SDN_RTTI_STRUCT_COMPONENTS
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145711"></a>
*& Thread: How to get the name of a Data Element of a generic Table!
REPORT zus_sdn_rtti_struct_components.
TYPE-POOLS: abap.
TYPES: BEGIN OF ty_s_outtab.
TYPES: bukrs TYPE bukrs.
TYPES: kunnr TYPE kunnr.
TYPES: END OF ty_s_outtab.
DATA: gdo_data TYPE REF TO data.
DATA: gs_outtab TYPE ty_s_outtab.
DATA: go_typedescr TYPE REF TO cl_abap_typedescr,
go_structdescr TYPE REF TO cl_abap_structdescr,
go_datadescr type ref to cl_abap_datadescr.
DATA: gs_comp TYPE abap_compdescr,
gd_dtel type string,
gt_dfies type ddfields.
FIELD-SYMBOLS:
<gs_struct> TYPE ANY.
START-OF-SELECTION.
BREAK-POINT.
GET REFERENCE OF gs_outtab INTO gdo_data.
ASSIGN gdo_data->* TO <gs_struct>.
go_typedescr = cl_abap_typedescr=>describe_by_data( <gs_struct> ).
go_structdescr ?= go_typedescr.
BREAK-POINT.
LOOP AT go_structdescr->components INTO gs_comp.
go_datadescr = GO_STRUCTDESCR->GET_COMPONENT_TYPE( gs_comp-name ).
gd_dtel = go_datadescr->get_relative_name( ).
write: / syst-tabix, 'Data element =', gd_dtel.
ENDLOOP.
END-OF-SELECTION.
Regards
Uwe -
How to get the list of deployed projects in OSB through commond line
How to get the list of deployed projects in OSB through commond line; as we are able to get in weblogic.
You can go with standard JMX API using WLST
http://www.oracle.com/technology/sample_code/products/osb/index.html
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e15033/index.html
or you can try a little bit tricky way like
ls $DOMAIN_HOME/osb/config/core/ | grep -v ^_:-) -
Urgent: How to get the names of all menu items
I have a .mmb menu module.
There are many menus and submenus in it.
Now I want to get the names of all menu items available in the module using sql or pl/sql.
Actually I need to store these names in another table as it is. That is why I want get them programmatically.
Any solution please.... bit urgent
ThanksWhen I needed the same, I wrote my own application using
Forms API (Windows,Forms 6.0,6i). Perhaps it will help
you.
Let me know your e-mail and I'll send it. -
How to get the name of tag or variable
Hi everyone,
I am a newbie, I have problem on getting the name or tag of the variable from OLE for Processing Control(OPC) server, could anyone tell me how I can get the name of tag or variable from writting vb codes or please direct me to any helpful information. Here are
my codes,
Dim ItemsDef(NBR_ITEMS) As String
Dim DeviceAddress As String
Dim IndItem As Long
DeviceAddress = "MBT:152.160.178.60"
'Preparing the Handles for "AddItems"
For IndItem = 1 To NBR_ITEMS
ItemsDef(IndItem) = DeviceAddress & "!40000" & Format(IndItem) '40000 is the memory location of variable in the OPC, how can I get the variable name, what is the code or syntax?
Next
blah...
Thank you,
CalvinHi Calvin,
If you are looking for general information and examples about OPC, then we have lots of places for you to browse!
Here is a small list, and you can probably find other links within these documents:
**If you have Measurement Studio from National Instruments, then you can look at the "Measurement Studio Reference" help file. Search for OPC and in the overview you will find the methods for accessing the items on an OPC server.
**Elsewhere in the help file, you can find a link to this Application Note on our developer zone
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&F4921B34CA8F4A9786256874005BE3F7&cat=7CDA3E51FEFC4AA2862568B80071A1E2
**One more resource is http://www.ni.com/opc
**Probably the most useful will be the examples yo
u can find on our web site. You can go to http://www.ni.com/support and in Option 3 search the Example Code database for "opc".
In the first example program (Controlling OPC Servers with the OPC Automation API in Visual Basic) that you should get when searching for "opc" in the example programs database, look for the line with this code: "browser.GetItemID(leaf)". There you can see the way the program creates an OPCBrowser from the server instance, and then gets the servers available items for use by the client. This sounds like the specific information you are looking for with the variable name.
If you aren't able to find out your answer here or in the various help resources, then please feel free to contact us at National Instruments at http://www.ni.com/ask
Regards,
John N
Applications Engineer
National Instruments -
How to get the name of the subform
Hi All,
My form is designed in the below structure.
masgterpage-->form1-->table
-->subform
How can i get the name of the subform dynamically(as it varies from page to page, but the rest of the structure is same).
Please help me.
Thank you,
Saravanakumar.Hi there,
the name property would be the correct attribute to get the subform name, just by looking at the code it doesn't seem like it's doing the right thing
I am assuming that you send Main in the function countChk() which would look something like this
countChk(Main);
And you probably want to make sure you are entering the right subform so you need to keep that loop at the end of the function
but if you want to get through all the checkboxes inside that subform you must do a loop through that node to find each checkbox
I am assuming that the function would probably look something like this
function countChk(vNode) {//Starts vNode with Main
for (var i = 0; i < vNode.nodes.length; i++) {
if (vNode.nodes.item(i).className === "field") {
if (vNode.ui.oneOfChild.className === "checkButton") {
if (vNode.items.nodes.length > 1) {
if (vNode.value.oneOfChild.value == 1) {
nChk++ ;
}else if (vNode.nodes.item(i).className === "subform"){
if (vNode.nodes.item(i).name === "Door_Subform"){
countChk(vNode.nodes.item(i));
}//endloop
Hope this help! -
How to get the name and value of an attribute on a node/element that is not a child
Hello,
Can someone shed some wisdom on how I can compare 2 xml nodes for differences.
My main challenge is I need to use the attributes/values of 'ProductDescription' and 'Features' as 'key' to identify the same node in
another doc with the same layout, but different content.
I am having trouble getting the name of the attribute on the node, 'ProductDescription' and 'Features'. I can only seem to get the node names, but not the attributes on the node. I need the name, because it can be different from doc to doc, so
I can't hardcode this.
Can someone please help with how to retrieve an attribute name/value on a node that is not a child. Here's an example of what
my xml looks like:
DECLARE
@myDoc1 xml
,@mydoc2 xml
DECLARE
@ProdID int
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
SET @myDoc2 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>2 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "wheel">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
I need to compare the attributes of 'ProductDescription' and 'Features' from @mydoc1 against @mydoc2 to see if they are the same based on those 2 nodes first. If they are, then i want to show the difference in the child elements.
This will eventually be an outer join to give me the differences betw the 2 docs based on those key values (node attributes).
I used node('//*') for the path, and value('local-name(../.)', 'varchar(50)') as element
,value('.[not(@xsi:nil = "true")]','VARCHAR(255)') AS new_value
...etc...
but that only gives me the node names, and the child elements. It does not give me back the attribute names and values from the node itself.
Thanks in advance for your help.
ceeAre you looking for something like this:
DECLARE @myDoc1 xml
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<Features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>'
SELECT T.c.value('local-name(.)', 'nvarchar(50)') AS name,
T.c.value('.', 'nvarchar(50)') AS value
FROM @myDoc1.nodes('ProductDescription/@*') AS T(c)
Erland Sommarskog, SQL Server MVP, [email protected] -
How to get the name of the attachment in Sender Mail Adaper?
hi mates,
I've scenario a where in I need to pick up a mail with an attachment and change its extension and send it to target system using file adapter.
I'm able to pick up the mail with attachment using sender mail adapter but not able to get the name of the attachment so that I can use it in mapping or on the adapter configuration. How do I read the name of the attachment and manupulate it?
I looked at the thread sender mail adapter - attachment name But the solution is not described. I think Stefan is talking about the SP!2 for PI 7.0. I'm on XI 3.0 what is the equivalent SP for that, SP20? Stefan, can you please throw me more light on it?
I appreciate your valuable inputs
thx in adv
praveenThanks Aamir.
Earlier I replied to that thread asking for more details...but did not see the response...
anyways, thanks for your quick help..
but I wonder abt the PI SP12/ XI SP20 pre-requisite. We can have adapter modules on SPs lower than PI SP12/XI SP20 as well, can we not?
thanks
praveen -
How to get the name before @ in an email id
Hi All,
How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
Thanksthinkingeye wrote:
Hi All,
How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
Thankscombine INSTR() & SUBSTR() functions -
How to get the name of a duplicated control or created control and add a callback to it
Hi All,
Depending on how many input points I need, I am duplicating a numeric or string input with the DuplicateCtrl function. My question is, how do I get the name and id of the control that was just created, and how can i assign a callback to it? Alternately, would it be better to create a fresh ctrl instead of duplicating?
Thanks in advance!
Solved!
Go to Solution.Hi TurboMetrologist,
why are you trying to get the control constant name? Keep in mind that you cannot use that name to address the control; control names are actually simply macros in the include file associated to the UIR, that is, the compiler preprocesses the code and wherever it finds PANEL_CONTROL names substitutes the corresponding numeric value as parameters to the functions (and consequently 'control' parameter is an int and not a char*)
That is why NewCtrl () or DuplicateCtrl () functions return a control ID: it is the handle to the new object, our only way to manipulate it. You will need to store this handle into a non-volatile memory so that you can access it durng program life.
Additionally, there are other ways to assign some particular meaning to a control than swiching on the control constant name. You could for example use the callbackData parameter to differentiate between different copies of a control.
Let me explain with an example. You told that you need several inputs (dynamically created as you don't know in advance how many of them to use); a clean solution could be to:
Design a master copy of one control in the UIR editor, where it is easy to customize it; assign also a callback function, if it has to be common to all copies of the control
Programmatically assign a callbackData value to that control, e.g. SetCtrlAttribute (..., ..., ATTR_CALLBACK_DATA, (void *)1);
Duplicate the control and then assign a different callbackData
for (i = 2; i < 5; i++) {
handle = DuplicateCtrl (...);
SetCtrlAttribute (..., handle, ATTR_CALLBACK_DATA, (void *)i);
By operating this way, every time the control callback is fired by any control it will receive the assigned callbackData, and you will be able to differentiate your code by a simple switch:
switch ((int)callbackData) {
case 1: // The master control
break;
case 2: // The first duplicated control
break;
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
How to get the name of a cell style
Hi, All,
I have a question about how to get the cell style name used by each cell in a table.
I looked at all the fonctions provides by: ICellStylesFacade and ITableStylesFacade, but I did not find the fonction I need.
Can someone give me some advises?
Thanks in advance!!String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
or with javascript
<H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
bye! :) -
How to get the name of the file parent
Hi,
i have a file in this location
File file = new File(MyFile.doc)
file.getParent(); returns
C:\Documents and Settings\Administrator\xyz
now from the string obtained i just want to get the value "xyz".i.e. i want to get the name of the parent directory.
how is it possibleYou may use String.indexOf()if(file.getParent().indexOf("/myProject/myPackage") != -1) {
...Or you might use regular expressions and Matcher class (or String.matches()) in case of higher complexity. -
How to get the name of a method?
How can I get the name of a method, before measure its time of execution?
[url
http://java.sun.com/developer/JDCTechTips/2003/tt0318.
html#2]DISCOVERING THE CALLING METHOD NAMEThis article uses Throwable.getStackTrace() which has been around longer than the one I mentioned (Thread.getStackTrace()):
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html#getStackTrace()
I actually meant to show Throwable.getStackTrace() in my original post but when I did a search on it Thread's was the first one I came across. -
How to get the name of the class which is currently in use
Hi all,
I have two classes Mother and Child, and I use this code to print the name of the class in use
DATA m TYPE REF TO zmother.
DATA class_name type string VALUE 'CHILD'.
CREATE OBJECT m TYPE (class_name).
CALL METHOD m->PrintName .
So, what is the source code that I have to put in the PrintName methode?
Thanks.Ok, but how can I get the name of the object class that calls the methode!
REPORT ztest_method.
* CLASS c1 DEFINITION
CLASS c1 DEFINITION.
PUBLIC SECTION.
METHODS: get_data.
ENDCLASS. "c1 DEFINITION
* CLASS c1 IMPLEMENTATION
CLASS c1 IMPLEMENTATION.
METHOD get_data.
****** What is the code to put here to know the name of this Class?*
ENDMETHOD. "get_data
ENDCLASS. "c1 IMPLEMENTATION
DATA oref TYPE REF TO object.
DATA: method TYPE string.
DATA: cla_name(20).
START-OF-SELECTION.
cla_name = 'C1'.
CREATE OBJECT oref TYPE (cla_name).
BREAK-POINT.
CALL METHOD oref->(method).
Maybe you are looking for
-
Problem with sqlldr and commit
Hi, i have a problem with sqlldr and commit. I have a simple table with one colum [ col_id number(6) not null ]. The column "col_id" is primary key in the table. I have one file with 100.000 records ( number from 0 to 99.999 ). I want load the file i
-
How do I assign the play button on my remote control
I made a simple menu with two buttons and it activates the buttons when I select using arrows and push enter, but not when I push play. I would like to be able to start the movie by pushing play as well. Thank you to anyone who can help me! Juli Kang
-
I didn't update the email address in the form I filled out for service. I wrote support but didn't get a response. Does anyone know how to get the address I am supposed to return the Nano to for service? Or how to get the address to return the Nano?
-
Request for howto - error processing best practise
Hi JDev Team. Something I would like to see in a future HOWTO would be error handling in a BC4J/JSP application. What is best practise? How do we make sure that when a database error occurs, we can trap the error and provide a friendly error message,
-
UCES 6.0: Logon Page
I have installed UCES 6.0. When I access it, it gave me a logon page that look like Portal logon page with a Biller Direct banner at the top of the page. How to make the Request New User and the Forget Password link to appear? When I check the source