Estoy trabajando en una aplicación Powers que requiere que tome un archivo adjunto y lo guarde en un sitio de SharePoint. Tengo la siguiente fórmula en un botón la cual genera el error que se muestra en la imagen.
Hi , @Jhon_Mario
Thanks for your response , can you try to use this code:
UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name;{ file: {
contentBytes: Last(DataCardValue89_1.Attachments).Value;
name: Last(DataCardValue89_1.Attachments).Name
} }
)
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
I really appreciate your help.
I did as you told me but the error still continues.
Hi , @Jhon_Mario
Thanks for your response! You need to check if your first parameter is Text in your Power Apps side:
If this , you can use this expression in your Power Apps:
UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name,{ file: {
contentBytes: Last(DataCardValue89_1.Attachments).Value,
name: Last(DataCardValue89_1.Attachments).Name
} }
)
It can work good in my side:
My expression separator here is a comma, which you can modify if it's a semicolon in your language, it may be this:
UploadfilesTest.Run( Last(DataCardValue89_1.Attachments).Name;{ file: {
contentBytes: Last(DataCardValue89_1.Attachments).Value,
name: Last(DataCardValue89_1.Attachments).Name
} }
)
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
Hi , @Jhon_Mario
Thanks for your response!
Can you show me your Power Apps V2 trigger input's parameter in your flow?
If your input is File type,, you need to deliver the record type in Power Apps Button as the Parameter :
{
file: {
contentBytes: xxxx,
name: "xxxx"
}
}
Solved: Trigger PowerApps (V2) & File - Power Platform Community (microsoft.com)
Sorry it seems i have leak the {} in the code , can you try to use this code:
Set(_VFlow;
VargeFacturacionExamenesV2.Run({
file: {
contentBytes: Last(DataCardValue89_1.Attachments).Value;
name: Last(DataCardValue89_1.Attachments).Name
} };
Last(DataCardValue89_1.Attachments).Name
)
)
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
Thanks for your support.
I already tried as you indicated and it generated another error.
The name is invalid. “file” is not recognized.
Unexpected characters. The formula contains "Error" where "ParenClose" was expected.
Unexpected characters. Characters are used in the formula unexpectedly
Hi , @Jhon_Mario
Dose your trigger parameter is "File" type in your flow.
If this , you can try to use this code:
Set(_VFlow;
VargeFacturacionExamenesV2.Run(
file: {
contentBytes: Last(DataCardValue89_1.Attachments).Value,
name: Last(DataCardValue89_1.Attachments).Name
};
Last(DataCardValue89_1.Attachments).Name
)
)
If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance!
Best Regards,
Yueyun Zhang
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
mmbr1606
275
Super User 2025 Season 1