cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sander_FLX
New Member

Quantity has always the same value in my list

Hi,

 

I created a simple powerapp to collect barcodes and put them into a sharepoint list.

In my Gallery I add 'Text Input' (Hoeveelheid) field, set the format for this as a number.

 

This is my OnScan code :

Collect(CollectMultiScan, {ScanId: ScanID.Text,BarcodeInfo:'Scan button_1'.Value,WhoScanned: User().FullName, WhenScanned: Now()})

 

This is my OnSelect code For my UPLOAD button :

ForAll(
CollectMultiScan,
Patch(
TEST,
Defaults(TEST),
{
ScanID: ScanId,
Title: BarcodeInfo,
Barcode: BarcodeInfo,
Aantal: Hoeveelheid.Text,
Who: WhoScanned,
When: WhenScanned
}
)
);
Clear(CollectMultiScan);
Set(
varvar,
GUID()
);
Reset(ScanID)

 

TEST is the name of my Sharepoint List

 

Everything works but the Quantity (hoeveelheid) is always the same... Even you fill in 3 in the 'Hoeveelheid' field after upload he always use the latest input from the collection...

 

Input in the APP :

 

Sander_FLX_1-1656679732073.png

 

 

Output in the List :

Sander_FLX_2-1656679784223.png

 

Could you help me, don't see the problem  ?

1 ACCEPTED SOLUTION

Accepted Solutions
Sander_FLX
New Member

Hi @Himanshu_90677 ,

 

I Solve it by changing the code :

 

ForAll(Gallery1.AllItems,Patch(TEST,Defaults(TEST),{ScanID:ScanId,Title:BarcodeInfo,Barcode:BarcodeInfo,Aantal:Value(Hoeveelheid.Text),Who:WhoScanned,When:WhenScanned}));Clear(CollectMultiScan);Set(varvar,GUID());Reset(ScanID)

 

I used CollectMultiScan for my collection and there was no 'hoevelheid' added to that collection so i took now the whole gallery.

 

It's solved.

View solution in original post

5 REPLIES 5
Himanshu_90677
Advocate V
Advocate V

@Sander_FLX  i think you need to check your sharepoint column setting > Default value

Hi @Himanshu_90677 ,

 

The Default value column setting off 'Aantal' is empty :

 

Sander_FLX_0-1656700072034.png

 

@Sander_FLX  Can you check SP Column Type is Number Value  Or Text Value? set it to number and then check

Sander_FLX
New Member

Hi, just changed it to number and the result still the same.

Always the same input from the last input field.

So if i set 1,2,3 in the 3 gallery lines. The result in my list is always 3 instead of 1,2,3.

Sander_FLX
New Member

Hi @Himanshu_90677 ,

 

I Solve it by changing the code :

 

ForAll(Gallery1.AllItems,Patch(TEST,Defaults(TEST),{ScanID:ScanId,Title:BarcodeInfo,Barcode:BarcodeInfo,Aantal:Value(Hoeveelheid.Text),Who:WhoScanned,When:WhenScanned}));Clear(CollectMultiScan);Set(varvar,GUID());Reset(ScanID)

 

I used CollectMultiScan for my collection and there was no 'hoevelheid' added to that collection so i took now the whole gallery.

 

It's solved.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,464)