Hi, so I want an icon not inside of my form to change colors if at least one attachment is added in the form, before submit.
I have tried setting variables, creating collections, setting a label in the form then checking that, etc.
Nothing is working though if statements just always come back as blank even when something is added and collections dont populate.
I have tried countRows and OnAddFiles and OnRemoveFiles... if I add a label in the form I can see an accurate count of items, but can't get that data out of the form to do stuff other places?
Ideas?
Thanks,
Terry
Customized... I mean I deleted out fields I didn't need? I had some code on the on add and on delete to try to increment a variable. But then deleted that too? The weird thing is when I had the form working on the other screen and I copied and pasted to the old screen it didn't work there either?? But like I said things seem to be working by delteing that form and starting over.
Edited: I missed your last post where you said you started over.
All I can think is there is something you are missing or something has gotten corrupted on your one screen. Has your first form been customized at all?
I just deleted everything and added a new form to the old screen, and everything is working again?? Thanks for the help. Would be good to understand why it was acting like that, but at least I can progress now.
ok created blank screen, added the form exactly like other screen, and it worked!! I could see a count outside the form...
I checked out all properties etc. between them both and they are identical??
So I copied the form from the first screen and pasted on the new screen, and it still didn't work??
So then I copied the new form to the old screen and it didnt work?
Getting a bit confused.
So new form on new screen = works
Old form on old screen - doesnt work
Old form pasted on new screen = doesnt work
New form pasted on old screen = doesn't work
So kind of confused on what is going on.
Thanks,
Terry
Can you add a temporary screen and add a new form with the same data source and item properties and then see if you can count the attachments outside of the form in a label?
I actually just added that capability to a totally separate app from where I tested it and it's working fine.
Also no containers or anything if that is where you were going.
This is a standard standalone Power App, not embedded in SharePoint, but does have the SharePoint backend List.
Thanks,
Terry
Is this a standard canvas app with a form in it, a SharePoint intgration app or a Power Apps for Teams app?
Yes tried many. Also I didnt show it int he screen capture but I have labels inside the form and those show the correct numbers and have the same formulas...
That is strange. Just out of curiosity, have you tried any other type of files besides text? It doesn't make any sense that you would get a different result, but.....