Scan barcode and change field status

Hi!

I have an app where I need to change the status of a field from: “Disable” to “Enable” by scanning a barcode.

The sequence would be like this:

  • Scan barcode
  • Automatically change the status of the field linked to that barcode from “Disable” to “Enable”.

I hope someone can help me!

Cheers

Tomás

0 7 729
7 REPLIES 7

LeventK
Participant V

What do you mean with “disable/enable”?? Do you mean to show that field or do you mean enabling that field for editing (assuming that you have either set the Show_if or Editable_if properties to FALSE)?
In both cases, you can use the expression ISNOTBLANK([BarcodeColumnName])

Hi Levent, thank you very much for your response. I´ll try to explain, I was not fully clear in my post.

Disable/Enable are two different enum status, they can be called ON/OFF, HIGH/LOW, its just a binary status.

By default all the records are set to “Disable” and have a particular barcode associated to them.

What I´m trying to achieve is: in a new form, with a “Scan” field, let the user scan the barcode (without the need of entering the edit mode) and automatically associate that barcode with the record I need to change from “Disable” to “Enable”.

I hope my explanation is clear! If not let me know.

Thanks in advance

@Tomas_Barthalot
Do you have a table in your app that represent the barcode values and associated binary status (ON/OFF, ENABLE/DISABLE or whatsoever)?

Yes I have. The main table contains a list of products and one of its columns is Barcode and other of its column is the status

@Tomas_Barthalot
You can create an Action on your products table: Data: set the values of some columns in this row, select the [Status] column and set the value as “Enable” (or whatever your setup is).
Then create a second Action on table which belongs to this form and select Data: execute an action on a set of rows. Select the Products table and for the referenced row enter an expression:

SELECT(
    Products[Status],
    [Barcode] = [_THISROW].[Barcode]
)

and as a referenced action, chose the action that you have created in your Products table. Lastly assign this action as a Form Saved property of your form.

Thanks Levente I will try this!

Cheers

You’re welcome

Top Labels in this Space