cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry BarcodeScan lastscanvalue

Former Member
0 Kudos

Hallo,

how can i set the lastscanvalue to nil or a blank string.

If i go to a detailscreen where i have a scan filed and want to use the lastscanvalue in the update rule i get the lastscanvalue from a scan action before. But i want only use the lastscanvalue from the scanner if i am in the detail screen.

Short use case: Show mainscreen and then i scan a material with number 123. So the lastscanvalue is 123. Now i navigate initial in my detail screen and in the update rule it use the 123. But i expect that the lastscanvalue is nil or a blank. How can i do that.

Thanks,

André

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Andre,

So you want to maintain two different lastscanvalues?  You can't control resetting that rule function yourself to blank.  You should keep them in main object temporary variables instead and point your screen update rules to these individual variables.  In your action that is tied to the scan on the first screen, add a transaction that writes lastscanvalue to a new main object property called lastscanone using an initial value rule on the property in the transaction.  Do the same thing for your other screen, except use a different transaction and write to property lastscantwo.  Then change the update rules on the two screens to point at the appropriate temp variable.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Dear Jason,

thanx for your answer. Your hint was helpful to me. My solution is this: before I enter my detail screen with the scanfield i write the lastscanvalue in a new main object property called temp_lastscanvalue. In the update rule i check if the  temp_lastscanvalue is the same as the actual lastscanvalu. So I know if the lastscanvalue was make for my detail screen or is it from the screens befor. So i can capture the wrong value.

Thanx all,

André

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Andre,

I am not sure I understand your use case.  Are you asking to scan something on the main screen and then use that value on a subsequent detail screen or are you trying to use the scanner on the main screen and also on a detail screen (transaction screen?) to get different scan values?

--Bill

Former Member
0 Kudos

Hi Bill,

no my motivation was the opposite. I want to check if the scanvalue was scanned on the main screen or on the detail screen. If the scan value was make for the main screen i will not use the value on the detail screen.

Thanx,

André