I'm making my first Power Apps canvas app, and am trying to have my start screen display the app's latest published version and associated date/time stamp. I'm using some sample code from m365princess.com but keep getting the following error:
PowerAppsforMakers.GetApp failed: The method 'GetApp' has an invalid value for parameter 'app'
I've put the following two functions in the app's OnStart property (but have also tried it in the start screen's OnVisible property, with the same results). The code sets two variables - appVersion and appTimeStamp, which are then used to code the text label on the start screen. My app's actual display name (represented below by "My App Name"). Not sure if it matters, but I've tried the code using my app's display name as is (with spaces) and also after having changed the app's display name to one without spaces - getting the same error for both versions.
Set(
appVersion,
CountRows(
PowerAppsforMakers.GetAppVersions(
LookUp(
PowerAppsforMakers.GetApps().value,
properties.displayName = "My App Name",
name
)
).value
)
);
Set(
appTimeStamp,
PowerAppsforMakers.GetApp(
LookUp(
PowerAppsforMakers.GetApps().value,
properties.displayName = "My App Name",
name
)
).properties.appVersion
)
I've then put the following code into the text label on my start screen:
"This is v." & appVersion & ", published " & appTimeStamp
Many thanks in advance for any help you can provide!
-- Zed