The onscan barcode reader formula is:
Set(
BarcodeReader1_Value,
true
);
Set(
parsed,
Substitute(
Substitute(
BarcodeReader1_Value,
"\n",
""
),
"\",
""
)
);
Set(
fields,
ForAll(
Split(
parsed,
":"
),
{Result: ThisRecord.Value}
)
);
Set(
id_value,
Substitute(
Index(
fields,
2
).Result,
"""",
""
)
);
Set(
name_value,
Substitute(
Index(
fields,
3
).Result,
"""",
""
)
);
Set(
phone_value,
Substitute(
Substitute(
Index(
fields,
4
).Result,
"}",
""
),
"""",
""
)
);
Set(
customerId,
Index(
ForAll(
Split(
id_value,
","
),
{Result: ThisRecord.Value}
),
1
).Result
);
Set(
customerName,
Index(
ForAll(
Split(
name_value,
","
),
{Result: ThisRecord.Value}
),
1
).Result
);
Set(
customerPhone,
phone_value
);