cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Patch error

Hi I am trying to patch ForAll but i am having problem due to COD textbox showing on the screenshot, normally the COD textbox when enter a value it registers on sharepoint a value amount and will show this record has a COD but the strange thing is when i enter a value my patch formula will work ok but without value on the COD textbox it will not patch ,please see the screenshot and my formula 

 

 

ForAll(
RepeattingTable_1.AllItems,
Patch(
Shipments,
Defaults(Shipments),
{
TrackingNumber: tbTracking_.Text,
ShippingFee:Value( tbShipFee_.Text),
Weight:Value( tbWeight_.Text),
Length: tbLenght_.Text,
Width: tbWidth_.Text,
Height: tbHeight_.Text,
DeclaredValue: tbDeclare_.Text,
CodAmount:Value(tbCOD_.Text),



Company: tbCompany_.Selected,
OrderDate: tbOrderDate_.SelectedDate,
Payment_x0020_Method: tbPaymentsMethod_.Selected,
ShippingMethod: tbShippingMethod_.Selected,
ShippingRoute: tbShippingRoute_.Selected,
Status: tbStatus_.Selected,

CODDUEDATE: tbCodDueDate_.SelectedDate,
DueDate: tbCodDueDate_.SelectedDate,
TotalPieces:Value( TbTotalShip_.Selected.Value),
Collect_x0020_on_x0020_delivery_: If( 
CODToggle.Value,
true,
false
),
Check_x0020_Number: tbCheckNo_.Text,
//Employee:tbEmployee_.Selected,
//DueDate: DataCardValue17_2.SelectedDate
InvoiceNumber: tbInvoice_.Text,
CODCollectionType: tbPayments.Selected,
CardNumber:tbCardNumber_.Text
//ImageData:First(ImageCollection).Value

 


}
)

)

 

 

 

Capture3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Patch error

Thanks @Ramole,

Try this in the Patch to replace the existing 

 

Codamount:
If(
   Value(tbCOD_.Text)>0,
   Value(tbCOD_.Text),
   0
)

 

 

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.

 

View solution in original post

11 REPLIES 11
Highlighted
Super User III
Super User III

Re: Patch error

Hi @Ramole ,

Put a label in your gallery with 

Value(tbCOD_.Text)

Do you see the value you want when you enter something in the box?

I also assume that CodAmount is a numeric field in your data source?

 

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.

Highlighted
Post Prodigy
Post Prodigy

Re: Patch error

Hi @WarrenBelz 

 

I have already put it 

Value(tbCOD_.Text)

but the problems is on patching when i enter nothing  on the box it should patch and show nothing back end see my formula please but the toggle Collect_x0020_on_x0020_delivery_ and  CodAmount is related example when i am filling the form if i did not enter no information COD box the Collect_x0020_on_x0020_delivery_ toggle stays off and it will record back end this record not COD amounr thats all but the problems i am having now is when nothing on COD box the patch not working but if i enter COD a value amount my path formula works fine

 

Thanks

Highlighted
Super User III
Super User III

Re: Patch error

Thanks @Ramole,

Try this in the Patch to replace the existing 

 

Codamount:
If(
   Value(tbCOD_.Text)>0,
   Value(tbCOD_.Text),
   0
)

 

 

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.

 

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Patch error

Hi @WarrenBelz 

 

The COD is now working with your formula, can you please me this CODCollectionType: tbPayments.Selected is dropdown and is linked how can i do same IF Statement like if there not entered any data COD box it doesnt record nothing at backend otherwise yes 

 

Thanks  

Highlighted
Super User III
Super User III

Re: Patch error

Hi @Ramole ,

Try this

Collect_x0020_on_x0020_delivery_: CODToggle.Value

 

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.

Highlighted
Post Prodigy
Post Prodigy

Re: Patch error

Hi @WarrenBelz 

I mean this 

CODCollectionType: tbPayments.Selected,

Highlighted
Super User III
Super User III

Re: Patch error

@Ramole ,

What type of field is CODCollectionType in your data, what is the Items of tbPayments drop-down and is it multi-select?

Highlighted
Post Prodigy
Post Prodigy

Re: Patch error

drop-down

Highlighted
Super User III
Super User III

Re: Patch error

@Ramole ,

I know the control is a drop-down. Can you please answer the three questions 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,654)