Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I want to show a grid of all the properties on my things but I want to dynamically change the columns shown depending on the visibility of the property to the calling user.
eg A battery operated Fan Thing has properties
rpm
setting
chargingStatus
percentRemaining
batteryVoltage
Engineer has access to all properties, and thus a grid will show all properties for each thing. They see all Things
Building manager does not have technical information (rpm and batteryVoltage) these will be missing from the grid. They see all Things
User can only see the same properties as the building manager but only for their device.
I know that I can retrieve a list of the visible properties on an individual thing using GetPropertyValuesAsMultiRowTable but want the visible data for all Things
Thanks
Solved! Go to Solution.
You will have to build you own service which returns columns depending on visibility.
You will have to build you own service which returns columns depending on visibility.
I had a feeling that would be the case,
Thanks
Also don't forget Visibility settings.
You could btw create two mashups and use the same service. What that means though is that all the properties still go to the Client, however only the items you want to display are displayed.
That's NOT full fledged securing the information and I'm not sure if that is harmful or not. It would depend on your use case and the information in the payload if that is acceptable.
I have this sorted now, this is how I resolved it:
I have a service to filter the data returned, which checks the ReadPermission on the property removing the field if it does not have the permission. As for the mashup - the infotable is now missing a datashape as such you have to select the 'show all columns' property. This works fine.
The only remaining issue is I want to use the selecte row to drive the rest of the page. As there is no datashape I can't select a source from my target. As I know that all rows will contain a name I suspect that I will have to hack the attribute link in via an export and re import.
Did you tried to put a simple DataShape with only the ID column?
Yes - it restricted the data shown in the grid to the column in the datashape.