First, you do not need to use this expression to populate the “sample name” column. Since your Sample No column is a Ref, you can simply dereference the “sample name” for it.
Use this expression in your sample name column:
[Sample No].[File]
As to the disappearing record, you mention leaving the Sample No column blank the row saves properly. How are you populating the Sample No column?
Can you show a screenshot of the Sample No column definition?
Can you get a screen sho of your WorkOrder table in AppSheet showing all of the columns?
You are using the Sample No as the row key and assigning it with an Initial Value expression of :
MAX(Sample APP[Sample No])+1
This will not work. If two users were doing this action at the same time, they could both get the same row key value. This creates a conflict for the row key and only 1 row will ever be shown in the app.
I get that you want a sequential number in the Sample No column but in a multi-user distributed system like AppSheet, it is basically impossible to do that - for the same reason mentioned about row key above. However, with certain care and circumstances it may work for you. Please read this post for more details.
I see you have a Row ID column in the table. I recommend using that column as your row key. Set the Initial Value to “UNIQUEID()” and I beleive you will see your disappearing row problem go away.
However, you will likely see occasionally that the Sample No column gets a duplicate value when multiple users are adding rows at nearly the same time.