Hello EddieE,
Are u referring to my Text Property formula?
Text(
LookUp(
'Norra Lager Saldo';
StringQRKod = gvarQR;
Unit
).Value
)
Or my collect button?
// Data Validation for 'gvarQR'
If(
IsBlank(gvarQR);
Notify(
MicrosoftTranslator.Translate(
"Du måste skanna produktens QR-kod för att fortsätta";
rdoLang.Selected.Value
);
NotificationType.Error
);
// If all validations pass, proceed with the collect operation
// If either 'gvarID06' or 'noIdNameTxtInp.Text' is not blank, proceed with the collect operation
If(
IsBlank(ID06Scanner.Value) && !IsBlank(noIdNameTxtInp.Text);
Set(
gvarID06;
noIdNameTxtInp.Text
);
Set(
gvarID06;
ID06Scanner.Value
)
);;
// Local Variable for Article number
UpdateContext({lclArt: SkannaQrArtValLbl.Text});;
UpdateContext(
{
lclUnit: LookUp(
'Norra Lager Saldo';
Artikelnummer = gvarQR;
Unit
)
}
);;
// Data Validation for numeric Input and collect values from different inputs
If(
IsNumeric(SkannaQrAntalTxtInp.Text) && Text(Value(SkannaQrAntalTxtInp.Text) >= 1);
Collect(
colUttag;
{
IDKort: gvarID06;
Artikelnummer: lclArt;
Produkt: gvarQR;
Antal: Text(Value(SkannaQrAntalTxtInp.Text));
Tidspunkt: Now();
Enhet: LookUp(
'Norra Lager Saldo';
Artikelnummer = lclArt;
Unit
)
}
);
Notify(
MicrosoftTranslator.Translate(
"Du får bara skriva siffror för mängd, inga bokstäver och decimaler";
rdoLang.Selected.Value
);
NotificationType.Error
)
)
);;
Reset(SkannaQrAntalTxtInp);;
Set(
gvarQR;
Blank()
)
Patch button formula
Navigate(KlarScreen);;
Notify(
MicrosoftTranslator.Translate(
"Uttag registrerat och klart! Tack så mycket";
rdoLang.Selected.Value
);
NotificationType.Success
);;
// For each item in the collection "colUttag", which is defined as "Varukorg", update the record in the "Norra Lager Saldo" data source
ForAll(
colUttag As Varukorg;
Patch(
'Norra Lager Saldo';// target data source
LookUp(
'Norra Lager Saldo';// data source to look up in
Artikelnummer = Varukorg.Artikelnummer// condition for the lookup
);
{
Antal: LookUp(// update the "Antal" field
'Norra Lager Saldo';// data source to look up in
Artikelnummer = Varukorg.Artikelnummer// condition for the lookup
).Antal - colAntVal// value to update the "Antal" field with, which is the result of the subtraction of "Antal Label" from the current "Antal" value
}
)
);;
// For each item in the "colUttag" collection, create a new record in the "Uttag av material" data source
ForAll(
colUttag;
Patch(
'Uttag av material';// target data source
Defaults('Uttag av material');// create a new record with default values
{
idKort: IDKort;
// update the "idKort" field
ArtikelNummer: Artikelnummer;
// update the "ArtikelNummer" field
Produkt: Produkt;
// update the "Produkt" field
Kvantitet: Antal;
// update the "Antal" field
Tidspunkt: Tidspunkt;
// update the "Tidspunkt" field
Site: {Value: "Norra"}
}
)
);;
// Clear the "colUttag" collection
Clear(colUttag);;
Set(
gvarID06;
Blank()
);;
Reset(noIdNameTxtInp);;
Navigate(KlarScreen)