0

I am designing a website that queries an SQL database when opened, providing a list of bills for the given user. I am using a custom SQL query with a Data Source/Data View and in the Command & Parameters window I have also specified a parameter 'userName' from the Cache value 'IDSID' (which is available when logged into the website). However, when I try to view the website, no results are output. It has the title of the View and 'Rows:' but no actual results. I even included a 'PRINT @userName' command at the end of the stored procedure so it seems to me that Sharepoint is not correctly grabbing the information from cache. I don't really know where to go from here as I am very new to Sharepoint and Google doesn't seem to provide much answers for me (at least, not that I can see). I would really appreciate any and all help - anything I might have missed? If you need any more information please let me know!

0

You can try using

<ParameterBinding Name="LogonUser" Location="ServerVariable(LOGON_USER)"/>

These are few IIS Server Variables

AUTH_USER, LOGON_USER, REMOTE_USER.. that you can use..

Reference

Getting the Current User Name or ID in SharePoint using SharePoint Designer (no code)

Send current user's parameter to External Content Type

3
  • That unfortunately did not work, but Server Variables aren't even an option in the actual Command & Parameters window for me :/
    – auxfnx
    May 9 '14 at 13:36
  • Did you try the last link ? May 9 '14 at 15:47
  • I cannot create an External Content Type on this type of Sharepoint website (I think it is because of the way Sharepoint as a whole is set up for end users in this organisation)
    – auxfnx
    May 12 '14 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.