Hi EveryoneI have primary address book(names.nsf) and secondry address book(nameshr.nsf) and in
both I have field name bnprofile. I have 3rd database where I select the user name and run the agent which match the user name in both the other databases and if found, it copy the XML which in bnproile field of secondry address book and paste it to the bnprofile field in primary address book.
here is the part of the code
Dim prihrProfile As NotesItem
Set prihrProfile=priUser.GetFirstItem("hrProfile")
If priUser.HasItem("hrProfile") Then
Set prihrProfile=priUser.GetFirstItem("hrProfile")
Call priUser.RemoveItem("hrProfile")
Else
Set prihrProfile=priUser.GetFirstItem("hrProfile")
End If
Call secXML.CopyItemToDocument(PriUser, "prihrProfile")
priUser.hrProfile=priUser.prihrProfile
' priUser.hrProfile = xmlBlob
priUser.Language = "en"
Call priUser.Save(True, True)
but when it copy the XML in primary addess book
bnprofile field, format get change.
Could someone tell me how I fix it.
Thanks
Subject: XML format get change when copy XML from one doc field to other doc using CopyItemToDocument.
What do you mean when you say the format gets changed?
Subject: RE: XML format get change when copy XML from one doc field to other doc using CopyItemToDocument.
This is XML in Secondry address book
<Transit>93633</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>93633012</OperatorID>
</Application>
<Transit>63503</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>63503005</OperatorID>
</Application>
<Transit>63313</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>63313005</OperatorID>
</Application>
and when copy to primarry address book hrprofile (text field) field it look like this
<Transit>93633</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>93633012</OperatorID>
</Application>
<Transit>63503</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>63503005</OperatorID>
</Application>
<Transit>63313</Transit>
<RoleType>SCS</RoleType>
<RoleLevel>1</RoleLevel>
<Telephone>4164164161</Telephone>
<Application ID="SB">
<ActionActivities>Y</ActionActivities>
<SendingActivitiesToStaff>N</SendingActivitiesToStaff>
<RelationshipDeveloper>Y</RelationshipDeveloper>
<TotalView>Y</TotalView>
<ViewOthersAgenda>N</ViewOthersAgenda>
<AssignOfficer>Y</AssignOfficer>
<ReportAccess>Y</ReportAccess>
<AgendaAccess>Y</AgendaAccess>
<ManagementFunctions>N</ManagementFunctions>
<IntTimeBoundReferrals>Y</IntTimeBoundReferrals>
<ExtTimeBoundReferrals>N</ExtTimeBoundReferrals>
<IntTimeBoundServRequests>N</IntTimeBoundServRequests>
<ExtTimeBoundServRequests>N</ExtTimeBoundServRequests>
</Application>
<Application ID="BCS">
<AccessLevels>
<CIS>20</CIS>
<RECAP/>
<MidMarketManagement/>
<ProblemLoans/>
<RSPAndCSB/>
<MAPSAndCashVault/>
<DailyExceptionReporting/>
</AccessLevels>
<OperatorID>63313005</OperatorID>
</Application>
Subject: RE: XML format get change when copy XML from one doc field to other doc using CopyItemToDocument.
There’s no detectable difference, at least not in a web browser. Is it just the indentation that’s changing?
Subject: RE: XML format get change when copy XML from one doc field to other doc using CopyItemToDocument.
Hi StanCould you please tell me what would be the best method to copy the XML which is in text field and copy to other database same text field without losing the formating of XML.
Thanks
Subject: Again, I see no change in the Format. I copied and pasted both lists…
and saved them to files. Compared them with a utility. The utility showed no differences.
Subject: RE: Again, I see no change in the Format. I copied and pasted both lists…
Hi BillHow I can test my XML uaing tool.
other question
if I have XML in one field and that field is text and also in a table with fixed length of row and copy this field to other field which is also in table using copyitemtodocument, weather the format will be change.
please let me know.
thanks
Subject: RE: Again, I see no change in the Format. I copied and pasted both lists…
You mean you want to retain wrapping across two text areas of different widths? That can’t be done without changing the DATA (inserting carriage returns where line breaks occur in the narrower of the two text fields).
Don’t worry about what it LOOKS like – it’s the characters that count.
Subject: Background … of issue
we have primary and secondry address book. Using some Java application other department populate the hrprofile field in secondry address book. That field is in a table and field is text. Format of XML file I already post in my 2nd post, give the user access to corporate sites for those user who are not using notes mail, but if the user is using the notes mail then using one other notes apps which have a agent which copy the hrprofile XML and copy over to the primary address book hrprofile field. but when script copy over the XML from secondry address field to primary it addedd some carrige return in XML file because of this user can not access the corporate web site. so what is the best to over come this issue. Weather i have put these field out side of table or some thing else.thanks
Subject: RE: Background … of issue
Neither a value copy nor an Item copy in LotusScript or Notes Java/CORBA classes will add carriage returns. Nor will a manual copy/paste. Something else must be wrong.