Hi @gguedes,
Could you please share more details about the formula you typed within the Items property of the Attachments control?
Actually, the Attachments field of a SP list item is required to provide a Table value consists of Attachment type data. The standard data structure of Attachment type data as below:
{
DisplayName: "File Name",
Value: "File Content",
Id: "",
AbsoluteUri: ""
}
So if you want to provide a Collection of images (or files) within the Items property of the Attachments control, your Collection data must have the following data structure:
I have made a test on my side, please take a try with the following workaround:
Add a Add Picture control and a button within your Edit/New screen (as above screenshot, on your side, it is FormScreen1), set the OnSelect property of the "Add" button to following:
Collect(
PhotosCollection,
{
DisplayName: "Picture_"&Text(GUID())&".jpg",
Value: AddMediaButton1.Media,
Id: "",
AbsoluteUri: ""
}
)
Unlock the Attachments Data card, set the Items property of the Attachments control to following:
PhotosCollection
Add the following formula within the OnSuccess property of the Edit form:
Clear(PhotosCollection)
The GIF screenshot as below:
Best regards,
Kris
Hi @v-xida-msft, thanks a lot for your answer. But it didn't work as expected.
Here is my formula:
Collect(
'Teste_Gestão de Relacionamento';
{
'Qual é a sua Coodernação':[@Dropdown4].Selected.Value;
'Pauta da reunião':[@TextInput1].Text;
'Qual a data do Engajamento':[@DatePicker2].SelectedDate;
'Stakeholders Presentes':[@Label1].Text;
'Funcionários Anglo American Presentes':[@Label2].Text;
'Próximos Passos':[@TextInput2].Text;
'Comentários Gerais':[@TextInput3].Text;
'Avaliação Geral da Reunião':[@Slider2_1].Value;
'Anexos':[@DataCardValue8_1].Attachments
}
);;
UpdateContext(
{
showPopup:true
}
)
In the Attachment "AppSample_2" there are my Sharepoint list columns. In "AppSample_3" the details of the formula problem. In "AppSample_4" I have my full formula and one of my app screens, as you can see as I use multiple sharepoint list connections I use a custom app, not a prebuilt form.
Every time I try to upload Attachments through the formula I get this error of incompatibility. Hope this makes my problem more clear.
Again, thanks a lot for your help.
Hi @gguedes thank you for your post and sorry to hear you're experiencing these issues.
@dinusc and @v-xida-msft could you review the new information provided and advise on a potential solution?
User | Count |
---|---|
136 | |
127 | |
75 | |
72 | |
69 |
User | Count |
---|---|
222 | |
135 | |
78 | |
58 | |
54 |