Hello,
I have problems with the BarcodeScanner. When I try to submit my form and want to view or modify it, the DataCardValue field displays its initial record + the new one (by default a barcode has 10 digits).
And when I try to create a new request just after, the field keeps the old scan even with a ResetForm(Form2)
On the OnScan of my BarcodeScanner i put this :
Set(Barcodevar;BarcodeScanner2.Value)
And this function in the Default field of DataCardValue :
If(
Form2.Mode = FormMode.Edit && Form2.Mode = FormMode.View;
"";
Parent.Default
) & If(
Form2.Mode = FormMode.New;
"";
Barcodevar
)
Can you please help me
Best Regards,
Imade
Solved! Go to Solution.
@Imade ,
That is what I thought it should do - you can go the other way around on the Default of the Text Box
If(
Form2.Mode = FormMode.New;
Barcodevar;
Parent.Default
)
but you can also put on the OnScan on the scanner
Set(Barcodevar;BarcodeScanner2.Value);
Reset(YourTextBoxName)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@Imade ,
There is something wrong here that is not obvious at the moment.
Firstly, put a label on the screen (you can delete it later) with Barcodevar and see if you get the value in it when you scan. This proves the value is in the Variable when you need it.
Next, clear the Variable on the saving the form - if you are using SubmitForm(), put this on the OnSuccess of the form
Set(Barcodevar,Blank())
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Imade ,
Your first logic cannot ever be true - I think this is what you are trying to do
If(
Form2.Mode = FormMode.Edit || Form2.Mode = FormMode.View;
Parent.Default;
Barcodevar
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @WarrenBelz,
Thank you for the answer.
Now when i try to scan with the button, no information appears in the field N°Delevry.
I would like that when I press the button the BarcodeScanner fills in the Delevry field and also leaves the possibility to fill in manually if the BarCode is unreadable.
And when i try to view or edit it show me the recorded value
@Imade ,
That is what I thought it should do - you can go the other way around on the Default of the Text Box
If(
Form2.Mode = FormMode.New;
Barcodevar;
Parent.Default
)
but you can also put on the OnScan on the scanner
Set(Barcodevar;BarcodeScanner2.Value);
Reset(YourTextBoxName)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
It works for the view and edit mode thank you !
I still have the problem FormMode.New it still keep the record . Even with this.
Set(Barcodevar;BarcodeScanner2.Value);;Reset(DataCardValue32)
i tried to put it in the button new form and same thing
@Imade ,
There is something wrong here that is not obvious at the moment.
Firstly, put a label on the screen (you can delete it later) with Barcodevar and see if you get the value in it when you scan. This proves the value is in the Variable when you need it.
Next, clear the Variable on the saving the form - if you are using SubmitForm(), put this on the OnSuccess of the form
Set(Barcodevar,Blank())
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@WarrenBelz ,
It works with the submit!
Once again you've helped me a lotthank you!
User | Count |
---|---|
174 | |
111 | |
86 | |
44 | |
41 |
User | Count |
---|---|
238 | |
149 | |
132 | |
77 | |
75 |