Im trying to apend values directly on a list using visual studios and integration studio but when im debugging on service studio none of the values show up.This is my function (integration studio view):
This is my structure "TextPerPage":
This is my function(visual studio view)*i'll leave the code bellow *:
And this is my service studio screen action and as its possible to see, it reached the end of the action so it runned the GetTextPerPagemanualTest server action and it also returned the "finished" on errormessage parameter :
public void MssGetTextPerPagemanualtest(byte[] ssPDF, int ssPageNumber, out RLTextPerPageRecordList ssTextPerPageOutPut, out string ssErrorMessage) {
ssTextPerPageOutPut = new RLTextPerPageRecordList();
ssErrorMessage = string.Empty;
// Manually create and add 3 records
RCTextPerPageRecord record1 = new RCTextPerPageRecord
{
ssSTTextPerPage = new STTextPerPageStructure
ssPageText = "hello",
ssPageNumber = 1
}
};
ssTextPerPageOutPut.Add(record1);
ssErrorMessage = "1";
RCTextPerPageRecord record2 = new RCTextPerPageRecord
ssPageText = "hello2",
ssPageNumber = 2
ssTextPerPageOutPut.Add(record2);
ssErrorMessage = "2";
RCTextPerPageRecord record3 = new RCTextPerPageRecord
ssPageText = "hello3",
ssPageNumber = 3
ssTextPerPageOutPut.Add(record3);
ssErrorMessage = "finished";
Hello João,
leave here an example:
Apprently the example worked, but @João Palhares can you explain what the difference was between the example and your code?
Hi João,
At least two things you're doing wrong. For one, when creating a new Record, always use
RCMyRecord rec = new RCMyRecord(null);
That is, call the constructor that has a parameter (but use null for input). This ensures the internal bookkeeping of records is taken care off, and all the attributes get their default values.
Secondly, you should use Append, not Add, to add a Record to a Record List. Not sure what Add is or does, but Append is the one you're looking for.
I did what you said but it still doesn't workservice studio view:
Visual Code view:
Well, for one, you shouldn't do new STTextPerPageStructure, as that's an attribute of record1, and this already initialized by the call to new RCTextPerPageRecord(null). Otherwise it looks ok at first glance.