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 738
7 REPLIES 7

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