I have added an attachment control to my app, but it is not behaving as it should.
I added an edit form from my list and chosen to only display the attachment field. I have not changed any settings, so all are defaulted to 'Edit' mode.
When I preview the app, it is in view mode. I have no earthly idea why this is happening.
Solved! Go to Solution.
Hi @JR-BejeweledOne ,
That is because the record you are trying to edit on the Attachment Form has not been created, so the form shows 'No Item to display'.
Let's try this, first to submit the Form as a new record with attachment, and then Patch the remaining data to just-created record.
1. Set the Form Default Mode to New, add the required Column into the Form(i.e. Title), set the Default to anything to make sure the required Column is not blank. then set its Visible property to false
2. Set the Save button.OnSelect:
SubmitForm(FormName);
3. Set OnSuccess property of Form:
Patch('SP list',{ID: FormName.LastSubmitted.ID}, {.....})
Hope this helps.
Sik
Follow this post for solution;
https://powerusers.microsoft.com/t5/Building-Power-Apps/Where-is-Attachments-Control/m-p/269332
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
I looked at that post already and it doesn't have any information that would potentially resolve my issue.
I have the attachment control in my app already, it was successfully added from a SharePoint list data source and it IS inside the form. I didn't move anything or change any settings.
The problem is all the settings are Edit mode but when the app is run, the attachment control is showing in view mode.
Have you tried changing the displaymode of the attachment to edit.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
I am not trying to be rude, but did you actually read my original post and look at the screenshots?
I added it as an EDIT form and the display mode, as indicated in the screenshot for the form and every data card shows that it is in edit mode.
Well I was specifically referring to the attachment control not the form. There are Read my last response. There are instance where specific control's mode may be different from the form itself. A form can be edit mode but a control inside that form can be view.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
In my original post, I included the following screenshots:
Everything is in edit mode as indicated by the screenshots in the original post.
I can't change anything to edit mode as it is already in edit mode, including the attachment control.
Hi @JR-BejeweledOne ,
What is the Item property of the Form?
From your last snapshot, it seems that you didn't configure the Item property so the form shows 'No Item to display' when you preview the app.
When the Form in Edit mode, the Item property is required, that means you need to bind the specific record of the data source to the Form.Item property.
Please try to set the Item property, Ex: First('SP list')
Hope this helps,
Sik
I added the attachment control from the list where the attachments will be going.
The items is set to parent. default, should it really be set to anything else since this is the list where the attachments will be stored?
Hi @JR-BejeweledOne ,
What I ask is the Items property of EditForm, not Attachment control.
If the EditForm mode is Edit, you need to bind the Form.Item property to the specific records of data source(Ex. First('SP list')), then the attachment control will appear when preview.
Sik
User | Count |
---|---|
203 | |
92 | |
83 | |
47 | |
42 |
User | Count |
---|---|
252 | |
105 | |
103 | |
62 | |
57 |