Script to read BARCODE

hello, I would like to read a barcode in a cell.
the reading works well, but at the end of the reading I would like the scripts to face the equivalent of enter so that the value is sent to a tag, I try with
if event.propertyName == ‘text’:
but i have a mistake
“object has no attribute ‘PropertyName’”
could someone help me.
thank you in advance

Post your code and describe how you are firing the event action.

Also list Ignition version, 7.9.x, 8.0.x, 8.1.x, Vision or Perspective?