@CuriousJ wrote:
Hi Brian,
I have below error when adding the variables to powerapps. Not too sure where I did wrongly. Pretty new to the powerapps and flow. Maybe you could share some insight. Thanks.
I have correct the code in OnVisible property on the second screen in the app as it should have actually referenced the original document file name and not "._dlc_DocIdUrl_Description" (my bad
).
The correct code for the OnVisible property should in fact be as follows:
UpdateContext({ loading_v: true });
UpdateContext({
pdf_v: 'PowerApps-GetPDFdocument'.Run(
Concatenate( First( Split( selecteditem_v.Name, ".") ).Result, ".pdf")
)
});
UpdateContext({ loading_v: false })
The purpose of the "Split" function used in the code above is to remove the file name extension of the original document name and thereaafter replace it with a ".pdf" file extension name.
Hope that solves the issue you were experiencing.
I have updated that blog with the correct code as well.