RichText Filed XML String Problem
Posted by amar ku das on 2.May.17 at 03:09 PM using a Web browser Category : Notes Client Release: 7.0.3 Platform: Windows Vista
Hi
I have One Richtext field and in my progrram i have created some XML string and put in Rich text field but when document created it show 5 to 6 same richtext field i donot understand whty it craeted multiple Richtext field instaed of One can any one help me
My Code
On Error Goto errH
Set S = New NotesSession
Dim XMLStr As String
Call ValidCharForXML
XMLStr="<?xml version=""1.0"" encoding=""UTF-8""?>" +Chr(13)
XMLStr= XMLStr + "<TUM_ItiData xmlns='tumlare'>"+Chr(13)
XMLStr= XMLStr + "<ItiData xmlns=''>"+Chr(13)
XMLStr= XMLStr + "<ReferenceNumber>" + tDoc.ReferenceNo(0) + " </ReferenceNumber>"+Chr(13)
XMLStr= XMLStr + "<TourName>" + tDoc.TourName(0) + " </TourName>"+Chr(13)
XMLStr= XMLStr + "<TourLeader>" + tDoc.TCName(0) + " </TourLeader>"+Chr(13)
XMLStr= XMLStr + "<MobileNo>" + tDoc.TCMobile(0) + " </MobileNo>"+Chr(13)
XMLStr= XMLStr + "<SalesOffice>" + tDoc.SalesOffice(0) + " </SalesOffice>"+Chr(13)
Set sDate = New NotesDateTime(tDoc.DepFromOrigin(0))
Set eDate = New NotesDateTime(tDoc.TermDate(0))
XMLStr= XMLStr + "<StartDate>" + Format(sDate.DateOnly, "dd-mm-yyyy") + " </StartDate>"+Chr(13)
XMLStr= XMLStr + "<EndDate>" + Format(eDate.DateOnly, "dd-mm-yyyy") + " </EndDate>"+Chr(13)
XMLStr= XMLStr + "<NumPax>" + Cstr(tDoc.NoOfPax(0))+" + "+Cstr(tDoc.FreePax(0)) + " </NumPax>"+Chr(13)
XMLStr= XMLStr + "<AgentName>" + tDoc.AgentName(0) + " </AgentName>"+Chr(13)
XMLStr= XMLStr + "<AgentRefNo>" + tDoc.AgentReferenceNo(0) + " </AgentRefNo>"+Chr(13)
tmpdtStr$=""
For j = 0 To Ubound(BkgDetailsArr)
'Msgbox SupID(j)
'If SupID(j)<>"" Then
dStr$=DD(j)
If tmpdtStr$<>dStr$ And tmpdtStr$<>"" And dStr$<>"" Then
XMLStr= XMLStr + "</ItiDetail>"+Chr(13)
XMLStr= XMLStr + "<ItiDetail>"+Chr(13)
XMLStr= XMLStr + "<ItiDate>" + dStr$ + " </ItiDate>"+Chr(13)
tmpdtStr$=dStr$
End If
If tmpdtStr$="" Then
XMLStr= XMLStr + "<ItiDetail>"+Chr(13)
XMLStr= XMLStr + "<ItiDate>" + dStr$ + " </ItiDate>"+Chr(13)
tmpdtStr$=dStr$
End If
XMLStr= XMLStr + "<ItineraryDetail>"+Chr(13)
XMLStr= XMLStr + "<UNID>" + UNID(j)+ " </UNID>"+Chr(13)
XMLStr= XMLStr + "<SuppID>" + SupID(j)+ " </SuppID>"+Chr(13)
infoS$ = ReplaceSubString(BkgDetailsArr(j), "<BR><BR>", "<BR>")
XMLStr= XMLStr + "<Date>" + DD(j) + " </Date>"+Chr(13)
XMLStr= XMLStr + "<City>" +Cty(j) +"</City>"+Chr(13)
XMLStr= XMLStr + "<Status>" + BkgSt(j)+ " </Status>"+Chr(13)
XMLStr= XMLStr + "<Time>" + Tm(j) + " </Time>"+Chr(13)
XMLStr= XMLStr + "<ItineraryDetails>" + infoS$ + " </ItineraryDetails>"+Chr(13)
XMLStr= XMLStr + "<Pax>" + Pax(j)+ " </Pax>"+Chr(13)
XMLStr= XMLStr + "<HandlingOffice>" + Hoff(j)+ " </HandlingOffice>"+Chr(13)
XMLStr= XMLStr + "<PicEmail>" + PICMailId(k)+ " </PicEmail>"+Chr(13)
XMLStr= XMLStr + "</ItineraryDetail>"+Chr(13)
'End If
Next
XMLStr= XMLStr + "</ItiDetail>"+Chr(13)
XMLStr= XMLStr + "</ItiData>"
XMLStr= XMLStr + "</TUM_ItiData>"
ITIDoc.XMLData=""
Set rtitem = New NotesRichTextItem(ITIDoc, "XMLData")
Call rtitem.AppendText(XMLStr)
'ITIDoc.XMLData=XMLStr
Set CreateXML = ITIDoc
Exit Function
errH:
Set CreateXML= Nothing
Print ">>>>>>>>>>>>> ERROR in CreateXML Function @ line " & Cstr(Erl) & " and error is " & Error & " <<<<<<<<<<<<<"
Exit Function
RichText Filed XML String Problem (amar ku das 2.May.17)
. . So you have code calling the functi... (Carl Tyler 2.May.17)
. . . . RE: So you have code calling the fu... (amar ku das 3.May.17)
. . . . . . RE: So you have code calling the fu... (Stan Rogers 3.May.17)
. . . . . . . . RE: So you have code calling the fu... (amar ku das 3.May.17)
. . . . . . . . . . RE: So you have code calling the fu... (Stan Rogers 7.May.17)
Resources
Lotus Support
Wikis
Lotus Forums