Neal Matthews
24th March 2009, 16:28
Hello,
Setting up a very simple session that just writes the date and time into a new record on a multi occurence form.
Intially tried to do this using the insert option but ran into a few problems as I didn't want any user input on the form so went for the "Update" button which called api code. See below.
This now works perfectly apart from the fact that when the records fill the screen up a new record is added but is not visible and the users only option to see it is to scroll.
Can anybody suggest how I can make the last record visible.
Cheers
Neal
choice.user.0:
on.choice:
m_date = dte$()
do.update=true
|PUT FIELDS
stpapi.put.field( "tssma9104m000", "tssma904.date", "20" & m_date(5;2) & m_date(1;4)) |DATE
stpapi.put.field( "tssma9104m000", "tssma904.time", m_date(7;2) & ":" & m_date(9;2) & ":" & m_date(11;2)) |TIME
stpapi.put.field( "tssma9104m000", "tssma904.dsc1", "." ) |DESC
ret=stpapi.insert( "tssma9104m000", do.update, error ) |INSERT
if error<>"" then
message("API insert error: " & error)
endif
ret=stpapi.save( "tssma9104m000", error ) |SAVE
if error<>"" then
message("API save error: " & error)
endif
|END API SESSION
stpapi.end.session( "tssma9104m000" )
if error<>"" then
message("API end error: " & error)
endif
message("Log Updated " & m_date)
execute(find.data)
Setting up a very simple session that just writes the date and time into a new record on a multi occurence form.
Intially tried to do this using the insert option but ran into a few problems as I didn't want any user input on the form so went for the "Update" button which called api code. See below.
This now works perfectly apart from the fact that when the records fill the screen up a new record is added but is not visible and the users only option to see it is to scroll.
Can anybody suggest how I can make the last record visible.
Cheers
Neal
choice.user.0:
on.choice:
m_date = dte$()
do.update=true
|PUT FIELDS
stpapi.put.field( "tssma9104m000", "tssma904.date", "20" & m_date(5;2) & m_date(1;4)) |DATE
stpapi.put.field( "tssma9104m000", "tssma904.time", m_date(7;2) & ":" & m_date(9;2) & ":" & m_date(11;2)) |TIME
stpapi.put.field( "tssma9104m000", "tssma904.dsc1", "." ) |DESC
ret=stpapi.insert( "tssma9104m000", do.update, error ) |INSERT
if error<>"" then
message("API insert error: " & error)
endif
ret=stpapi.save( "tssma9104m000", error ) |SAVE
if error<>"" then
message("API save error: " & error)
endif
|END API SESSION
stpapi.end.session( "tssma9104m000" )
if error<>"" then
message("API end error: " & error)
endif
message("Log Updated " & m_date)
execute(find.data)