Help

Updating a Barcode field with a string in a script

Solved
Jump to Solution
1478 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Hamish_Ahern
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all, I have tried for over 2 hours to get this to work, but can’t seem to.

I am trying to update a barcode primary key field. but the closest I got was this error message:

Type ‘string’ is not assignable to type ‘{ text: string; type?: string; }’.(2322)

1 Solution

Accepted Solutions
Hamish_Ahern
5 - Automation Enthusiast
5 - Automation Enthusiast

oh I figured it out, you have to put it inside an extra object with { } and use the text: property. so that you can update barcode fields.

    await table.updateRecordAsync(record, {
        'Barcode field Name': { text: prefix + nextnumber, },
    });

See Solution in Thread

2 Replies 2
Hamish_Ahern
5 - Automation Enthusiast
5 - Automation Enthusiast

oh I figured it out, you have to put it inside an extra object with { } and use the text: property. so that you can update barcode fields.

    await table.updateRecordAsync(record, {
        'Barcode field Name': { text: prefix + nextnumber, },
    });

Glad to know that you were able to find a solution! If you would, please mark your latest comment as the solution to your question. This helps others who may be searching with similar questions. Thanks!