Hello,
I have a simple form where it has a table (In Memory) as a datasource.
On page load, I m filling this table from data coming from web services on the fly.
Once page gets loaded, User adds a new record in it. For each line user adds, i want to assign the new Line num which would be in addition to the max linenum out of the record i got from the web service records.
Hence in Initvalue() method of table, I am trying to find the max linenum from the existing record but I always get 0 records. not sure why. User could see the records came from the web service on the form. They can add the new record as well but LineNum is not getting set correctly for these new records. ALL newly added records gets LineNum=1 because it thinks that there is no any record in the table.
Table's initvalue method is shown below.
public void initValue()
{
MyTempTable tmp;
super();
select maxOf(LineNum) from tmp;
this.LineNum = tmp.LineNum +1;
}
Can someone help to identify what's missing?
*This post is locked for comments