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

Auto Add

Hello Everyone,

 

I need help on this please i am trying to archive this, i have a form and gallery repeating and i would when user enters Number Package field example 2 on form then the bottom repeating gallery to add 3 blank lines, whats the logic or formula to use please.

here is a screen shot 

Thanks 

 

galleryaddauto.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.
11 REPLIES 11

Hi @v-siky-msft 

I have put the code onvisble and its doing adding but when i try to delete number of packages to none the repaeting rows still there, is there a way when i clear the text box it clears the rows ?

 

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 ,

 

Yes, try this. If the text box is not blank, save the value into a variable and create blank records, when the text box is cleared, remove the Last N records based on the variable.

If(IsBlank(DataCardValue60_2.Text),
Remove(NewShipCollection, LastN(NewShipCollection, VarNum)), 
Set(VarNum,DataCardValue60_2.Text);ForAll(
FirstN(ColNum,Value(VarNum)),
Collect( NewShipCollection,
{CItemSerialNumber: Text(Last(NewShipCollection).CItemSerialNumber + 1),
Clevel: "",
Ctc: "",
Cdescription: ""
})))

Hope this helps.

Sik

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.

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 (3,165)