Author |
Message
|
Sridar |
Posted: Thu Aug 31, 2006 1:05 am Post subject: Referencing Atributes |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Hi
Pls refer to the below piece of code
Code: |
DECLARE DPCI_REF REFERENCE TO UDPGEVNT.UDPGItems[I].ProductIdentifier.DPCI;
SET SET Environment.Variables.Mandatory.Fields[] = LIST{DPCI_REF.DeptID,DPCI_REF.ClassID,DPCI_REF.ItemID};
DECLARE FIELD_REF REFERENCE TO Environment.Variables.Mandatory.Fields[FRST_FLD];
|
Here DeptId,ClassId,ItemID are attributes of the Element DPCI.
These Attributes and the values are listed under the DPCI_REF reference in the debugger but the values are not assigned to the Environment.Variables.Mandatory.Fields .
Can anyone tell me where i am wrong?
Is my method of accessing the attributes wrong? _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 31, 2006 4:30 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
but the values are not assigned to the Environment.Variables.Mandatory.Fields |
I'm not entirely clear what that means. Are the fields there, but with null values, or are they absent? What's the problems that you are trying to solve? |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Aug 31, 2006 7:42 pm Post subject: Re: Referencing Atributes |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi Sridar,
Try
Code: |
DPCI_REF.(XML.attr)DeptID |
Regards. |
|
Back to top |
|
 |
Sridar |
Posted: Sun Sep 03, 2006 11:53 pm Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
kimbert wrote: |
I'm not entirely clear what that means. Are the fields there, but with null values, or are they absent? What's the problems that you are trying to solve? |
I am trying to create some recurring fields by the name "Fields" in Environment.Variables and trying to assign the values of Attributes DeptID,ClassID,ItemID.
Only the "Fields" is created but no value is assigned.
Elvis,
Still am not able to get the values. I have howewer set values in the message.
I have tried giving the complete path instead of reference but still no hope.
Is the Syntax correct. If so then i think i have to check with my message structure. _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Sep 04, 2006 4:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The code you posted said "SET SET".
I'm sure that's not the code you used. Also, the Toolkit will flag any ESQL syntax errors. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Sridar |
Posted: Mon Sep 04, 2006 6:25 pm Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
All,
Sorry the double SET was a typo.
I did not get any Syntax error. Can Attributes be assigned to Environment.Variables like any other structure?
It's still not resolved? _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
kimbert |
Posted: Tue Sep 05, 2006 12:35 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Can Attributes be assigned to Environment.Variables like any other structure? |
You need to make sure that the destination tree is owned by the same parser as the source tree ( so you need to create your root node Environment.Variables.Mandatory using the CREATE LASTCHILD statement with a Domain clause ). Not sure whether this is your problem, but it's definitely worth a try. |
|
Back to top |
|
 |
|