Hi All,
I have been trying to achieve the functionality to add auto-increment numbers based on the number of records present in the gallery. However, I have an auto number in one of my galleries from which I am trying to reference the data and creating another collection.
So the issue is I am not getting the row number that I am trying to reference to my new collection string item. I am only getting the first number which is 0 and the rest is blank,
but on the same hand I am getting all the number if am using a separate column in my collection as you can see below which is xmlId, and this shows all the number.
Please see that am trying to add ExportUniqueId.Text i.e
number= "& Concatenate(
"""",
ExportUniqueID.Text,
""""
) &">
from my ExportDataGal.allItems. The detail code is as shown below.
ForAll(
ExportDataGal.AllItems,
Collect(
testColxmldata,
{xmlId: ExportUniqueID.Text, xmlData:
"<FinEntryLine type= "& """N""" &" subtype= "& """T""" &" number= "& Concatenate(
"""",
ExportUniqueID.Text,
""""
) &">
<Date> "& ExportCreated.Text &" </Date>
<GLAccount code=" & Char(34) & Left(
ExportGLcode.Text,
5
) & Char(34) & "/>
<Description>" & ExportDescription.Text & "</Description>
<Costcenter code=" & Char(34) &
varCostCenterCode
& Char(34) & " />
<Costunit code= " & """D001""" & " />
<Creditor code= " & Concatenate(
"""",
varCreditorCode,
""""
) & " />
<FreeFields>
<FreeNumbers>
<FreeNumber number= " & Char(34) & "4" & Char(34) & " >" & "16002" & "</FreeNumber>
</FreeNumbers>
</FreeFields>
<Amount>
<Currency code=" & """EUR""" & "/>
<Debit> " & ExportDayTotal.Text & " </Debit>
<Credit>" & "0" & " </Credit>
<VAT code=" & """0""" & " />
</Amount>
<Payment>
<InvoiceNumber>" & "123654" & " </InvoiceNumber>
</Payment>
<FinReferences>
<YourRef>" & "RCT 114" & " </YourRef>
<DocumentDate>" & Text(
ExportCreated.Text,
"yyyy-mm-dd"
) & "</DocumentDate>
</FinReferences>
<DocumentAttachment publish= " & """0""" & ">
<DocumentType number=" & """7""" & "/>
<Subject> " & "Invoice Name.pdf" & " </Subject>
<Division code= " & """001""" & "/>
<Account>
<Creditor code= " & Concatenate(
"""",
varCreditorCode,
""""
) & " />
</Account>
<OurRef>" & "125463" & "</OurRef>
<YourRef>" & "RCT 114" & "</YourRef>
<FreeFields>
<FreeNumbers>
<FreeNumber number= " & """4""" & "> " & "16002" & "</FreeNumber>
</FreeNumbers>
</FreeFields>
<Attachment>
<Name> test.pdf </Name>
<BinaryData>
Add attachment code here (base64)
</BinaryData>
</Attachment>
</DocumentAttachment>
</FinEntryLine>"}
)
) ;
The fine result in the gallery:
Thanks a million for taking the time to read and for your help.

Report
All responses (
Answers (