Hello Community, 

I have a problem to create a validation on my screen. 

I wouldn´t like that the same book included again in the "BookList". 

But When I created the "ListFilter" this error appears. 

Can someone let know What I´m doing wrong and what that a means this error?

[HCIIVM038].DBO.[OSUSR_L6O_BOOK] with key 0 was not found

eSpaceVer: Id=1372, PubId=0, CompiledWith=11.9.0.16900
RequestUrl: https://jajmarques.outsystemscloud.com/SistemadeBiblioteca/Book_Loan.aspx?_ts=1601300016389 (Method: POST)
AppDomain: /LM/W3SVC/41/ROOT/SistemadeBiblioteca-866-132457731488948863
FilePath: C:\OutSystems\Sandboxes\HCIIVM038\Platform Server\running\SistemadeBiblioteca\Book_Loan.aspx
ClientIp: 95.92.122.231
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 11772 ('w3wp', Started='8/19/2020 11:30:26 PM', Priv=900Mb, Virt=2119614Mb)
TID: 8
Thread Name:
.NET: 4.0.30319.42000

[HCIIVM038].DBO.[OSUSR_L6O_BOOK] with key 0 was not found
at ssSistemadeBiblioteca.ExtendedActions.GetBook(HeContext heContext, Int64 inParamId, RCBookRecord& outParamRecord)
   at ssSistemadeBiblioteca.Flows.FlowMainFlow.ScrnBook_Loan.CommandOnChangeCheckBox(HeContext heContext)



I´m trying to avoid this situation:

Best Regards, 

Jessica Marques. 

I attached the oap.

Solution

Hi Jessica,


Your error is actually on getting the book by an id which is empty (you can see on your log stack the error comes from GetBook action), but you also are removing always position 0 on the alternative flow on the ListRemove:



You can pass an attribute CurrentRowNumber (the position of the record in the table you're clicking) and the Book id you're clicking and fill it in on the actions.




Hope it helps.


Cheers,

João

Solution

João Marques wrote:

Hi Jessica,


Your error is actually on getting the book by an id which is empty (you can see on your log stack the error comes from GetBook action), but you also are removing always position 0 on the alternative flow on the ListRemove:



You can pass an attribute CurrentRowNumber (the position of the record in the table you're clicking) and the Book id you're clicking and fill it in on the actions.




Hope it helps.


Cheers,

João

 Hi João, 

It works for the error, I really would like to understand.  Thanks for the help. 

But for my goal to avoid duplicate books on the BookList not yet. In this case, I believe that the problem is with reset filters and pagination...

(As it is a different subject I will open another forum)

Cheers, 

Jessica Marques.