cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

CurrentSessionInfo Link Issue?

pbaierl
1-Newbie

CurrentSessionInfo Link Issue?

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?

19 REPLIES 19
ankigupta
5-Regular Member
(To:pbaierl)

Hi Paul,

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.

Thanks,

Ankit Gupta

Hi Ankit,

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.

Aanjan
9-Granite
(To:pbaierl)

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.

pbaierl
1-Newbie
(To:Aanjan)

Aanjan,

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.

Aanjan
9-Granite
(To:pbaierl)

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?

Aanjan
9-Granite
(To:pbaierl)

It usually does not take inputs; it would just pick up whatever user is currently logged in. Does checking 'ShowAllColumns' not display them either?

pbaierl
1-Newbie
(To:Aanjan)

I double checked.  I am showing all of the columns.

The grids on the mashup have two columns (shown below)

Aanjan
9-Granite
(To:pbaierl)

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?

Here is a trace I ran.

I didn't see any issues on the log.  Does this help?  I am running this site as an Admin User.

Is there any other information I can provide to help clear up the issue?

Aanjan
9-Granite
(To:pbaierl)

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?

pbaierl
1-Newbie
(To:Aanjan)

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.

Here is how I configured my service to get the Organizational Units a user has access to.  There are no configured inputs.

Aanjan
9-Granite
(To:pbaierl)

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?

pbaierl
1-Newbie
(To:Aanjan)

Now my column headings do not show up

The mashup shows:

Composer 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.

Could this be an issue with my version of Composer? 

Aanjan
9-Granite
(To:pbaierl)

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.

Top Tags