I created a service to return the Organizational units a logged in user is a member of.
I tested my service in composer and verified everything works correctly.
However, when I attempt to use the services in my mashup without success. Any suggestions as to what I am doing wrong?
Are you using the same user in composer and Mashup? There could be a difference in access rights to the service.
Are there any errors in the application/script logs?
More detailed steps on what you are doing on Mashup would be helpful to answer your query.
I have tried multiple users to test the mashup including ones that have administrative access.
I can use the test service button on my thing and get the correct values to be displayed in the result. However, I cannot get the service to populate values of a grid in a mashup (regardless of user). I am not sure if I am not passing in the correct information to have my service return a value. There are no errors or warnings displayed in the application monitor when I test my mashup.
I am using the default snippet to get the organizational units of the logged in user.
// result: INFOTABLE dataShape: EntityList
var result = Resources["CurrentSessionInfo"].GetCurrentUserOrganizationalUnits();
The output is an info table.
Paul, can you try enabling/ checking 'ShowAllColumns' on your Grid widget's properties (the bottom left pane)? Since your service result is dynamic, you might get a blank grid (if that's what you are seeing on your Mashup). Checking ShowAllColumns would make it render/ display all data.
I will double check this, however, I am not currently restricting the columns. All I did was link all data returned from the service to the grid as this is just an attempt to get everything working.
Alright, please do check that and let me know. If the grid, in the Mashup Builder stage, says 'Must Be Bound To Data' even after binding data, it would not display any columns unless you select 'ShowAllColumns'.
I have tried calling the service at mashupload, and when a button is clicked.
My service does not have an input so I do not have any links going into it. Could this be my issue? If so; how do I pass in the currentsessioninfo?
It usually does not take inputs; it would just pick up whatever user is currently logged in. Does checking 'ShowAllColumns' not display them either?
Can you try running this as an Admin? Can you click on the Show/Hide Log button when you're viewing your Mashup to see if there are any messages there?
Just to confirm, your service returns the list of Org units when you run the service directly on the Thing, but does not get displayed on the Mashup, correct? Can you post screenshots of the binding and your Grid's properties panel?
Here is what I get when I test my service.
Here is the grid after I link all data.
Here is the what I have linked. I am using the same user when I run the test as when I run the mashup so I should see the same results (I would think).
The mashup grid remains blank when the mashup loads. I didn't see any errors in the monitor.
As a quick run, can you try removing the EntityList Data Shape (leave it blank with no shape), save the service, now check 'ShowAllColumns' on the Grid, rebind the service output to the Grid and view the Mashup?
Now my column headings do not show up
The mashup shows:
I completely deleted the service and added it back and linked everything.
I checked and unchecked the SelectAllColumns checkbox with no change. I also deleted and created a new grid with the same results.
Since that's a dynamic output, the Grid will still say 'Must be bound to data' even if you bind something to it; but it will display all data is you check 'ShowAllColumns'. With that being said, our current 6.6.x release is 6.6.7; please do upgrade if you can.
I got it working. The problem was that I was using a dynamic thing without a Entity Name linked to it.
I stopped using they dynamic thing information and everything is working correctly now.