cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramole
Super User
Super User

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

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

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
WarrenBelz
Super User
Super User

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.

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

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.
WarrenBelz
Super User
Super User

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.

 

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  

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

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.

Hi @WarrenBelz 

I mean this 

CODCollectionType: tbPayments.Selected,

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

@Ramole ,

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

drop-down

Thank you
If this post helps, then Click on the Thumbs Up below. and Accept it as the solution . to help others find helpful.

@Ramole ,

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,101)