Hi, I have created a custom property of type "Record" in a component and trying to initialize it "OnVisible" action of a screen but it says "Invalid argument type".
But as you can see in below images, data type is "Record" of both i.e. component's custom property and the value that is being assigned.
Can someone please help me know where I am wrong and what is the correct way of initializing customer property of type Record.
Thanks
Solved! Go to Solution.
Yes exactly, so just move the formula from the OnVisible action to the Assessment property of the Custom Component you have on that screen.
You do have the component on the screen (I am sure at this point) and I assume component is named cmpBreadcrumbMenu_1
So, on the Assessment property of cmpBreadcrumbMenu_1 to:
LookUp(Assessments, 'Assessment (...sessmentid)' = GUID("0087fc6c-2128-eb11-a813-000d3a7f59a6"))
(note: fix the part in red above as it was not clear in your picture example)
You cannot assign values to properties like that in PowerApps.
You would need to move that formula to the Assessment property of the component on the screen.
And you should consider using a LookUp rather than a First(Filter as this method will filter all of the matching records (iterating through all of them) and then taking the First record. LookUp will start iterating and stop at the first record it finds.
I hope this is helpful for you.
Thanks Randy for the suggestion of using Lookup instead of Filter. I didn't know about that.
"You would need to move that formula to the Assessment property of the component on the screen." - Sorry I could not understand what do you mean by this. I am doing this on screen itself where I have placed the component.
Thanks
Yes exactly, so just move the formula from the OnVisible action to the Assessment property of the Custom Component you have on that screen.
You do have the component on the screen (I am sure at this point) and I assume component is named cmpBreadcrumbMenu_1
So, on the Assessment property of cmpBreadcrumbMenu_1 to:
LookUp(Assessments, 'Assessment (...sessmentid)' = GUID("0087fc6c-2128-eb11-a813-000d3a7f59a6"))
(note: fix the part in red above as it was not clear in your picture example)
Thanks Randy. It worked for me.
Thanks
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |