I've a requirement, where I need to use updatecontext inside a ForAll function, I understand it's not supported. Do you have any alternatives/ suggestion on this use case. Please find the code below, any suggestion is really appreciated. // I'm adding data into SharePoint List from a collection ForAll (JobSheeWCollection, Patch ('Job Sheet', Defaults('Job Sheet'),{ Title: Customer, Mobile: Mobile, Email: Email, Address: Address, MachineModel: Model, JobType: InsType, CustomerRemark: CustRemark, EngRemark: EngRemark, SLNo: SLNo, TempID: ID, JobID: "JOB No : 0" & Last('Job Sheet').ID + 1 } ); //Can't assign any variable here, from another collection //UpdateContext( { sFileContent: Filter(SignatureList,FileContent in ID).FileContent } 😞 Not supported Filter(SignatureList,FileContent in ID).FileContent; //Executes with no error //Run a flow which accept 2 parameters (file name, file content), to upload file into sharepoint folder, and //getting error in below line. CreateSignature.Run( "JoobID:"& Last('Job Sheet').ID & ".png", JSON(Filter(SignatureList,FileContent in ID).FileContent))); ); Thank you for your support. Thank You Ananda
|
Hi @ananda ,
Although it is not supported to define a variable in ForAll loop, you can collect data to collection, so use Collection to store and reference data.
However, what is the error in your case? I have some confusion with your code:
1. What does the Filter code mean? What is SignatureList? Why does this mean that 'FileContent in ID'?
2. You miss the JSONFormat in JSON function, it should be: JSON("Your Data",JSONFormat.IncludeBinaryData)
Please share more information.
Sik
Managed to execute the code without error, data saved, but images are not visible. now it's formatting issue.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
278 | |
236 | |
84 | |
37 | |
35 |
User | Count |
---|---|
356 | |
240 | |
130 | |
71 | |
50 |