The following Session Properties are available to Huddleforce applications to customize your output:


SessionRuntimeSettings.UserId
Current User ID
The ID of the logged in user.
SessionRuntimeSettings.UserName
Current User DisplayNameThe name of the logged in user.
SessionRuntimeSettings.FamilyId
Active Family ID
The active family ID which the user is logged in under.
SessionRuntimeSettings.FamilyName
Active Family Name
The active family name which the user is logged in under.
SessionRuntimeSettings.NetworkHostId
Network ID

SessionRuntimeSettings.NetworkHostName
Network Hostname

ApplicationRuntimeSettings.Id
Application ID
The ID of the active application.
ApplicationRuntimeSettings.Name
Application Name
The name of the active application.
ApplicationRuntimeSettings.PropertyValues
Application Properties Collection
If the application has any property values defined by the subscribing family.
ApplicationRuntimeSettings.ViewAsFamilyId
View Application As Family ID
If the active application can be viewed as other families, this will display the family ID selected for the application.
ApplicationRuntimeSettings.ViewAsFamilyName
View Application As Family Name
If the active application can be viewed as other families, this will display the family Name selected for the application.


You can use this code to display these values in a new application:


HTML

<div id="Instructions">
  This application was built to demonstrate the platform session properties that are available for use by applications when accessing
  information for user presentation.  Data can be linked to platform attributes such as the Current User ID logged into the platform, 
  or the subscribing Family ID.  Applications can be used to retrieve data based on the real time values.

  The application content shown here demonstrates real-time values available to the application at runtime:
</div>
<div id="Errors" style="color:red"></div>
<table class="tblEntries table table-striped table-bordered" style="table-layout:fixed">
  <tr><td class="overflow-ellipsis" width="200"><B>Current User ID</B></td><td class="overflow-ellipsis"><div id="MyUserId"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Current User Name</B></td><td class="overflow-ellipsis"><div id="MyUserName"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Active Family ID</B></td><td class="overflow-ellipsis"><div id="MyCompanyId"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Active Family Name</B></td><td class="overflow-ellipsis"><div id="MyCompanyName"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Network ID</B></td><td class="overflow-ellipsis"><div id="MyNetworkHostId"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Network Hostname</B></td><td class="overflow-ellipsis"><div id="MyNetworkHostName"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Application ID</B></td><td class="overflow-ellipsis"><div id="MyApplicationId"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>Application Name</B></td><td class="overflow-ellipsis"><div id="MyApplicationName"></div></td></tr>
  <tr>
    <td id="MyApplicationProperties1Label" class="overflow-ellipsis">
      <B>Application Properties</B></td><td class="overflow-ellipsis"><div id="MyApplicationProperties1"></div>
    </td>
  </tr>
  <tr><td class="overflow-ellipsis"><B>View As Family ID</B></td><td class="overflow-ellipsis"><div id="ViewAsFamilyId"></div></td></tr>
  <tr><td class="overflow-ellipsis"><B>View As Family Name</B></td><td class="overflow-ellipsis"><div id="ViewAsFamilyName"></div></td></tr>
</table>


Javascript

$(document).ready(function() {
  RefreshView();  
});

function RefreshView() {
  
  
  var sSettings = SessionRuntimeSettings();
  $('#MyUserId').html(sSettings.UserId);
  $('#MyUserName').html(sSettings.UserName);
  $('#MyCompanyId').html(sSettings.FamilyId);
  $('#MyCompanyName').html(sSettings.FamilyName);
  $('#MyNetworkHostId').html(sSettings.NetworkHostId);
  $('#MyNetworkHostName').html(sSettings.NetworkHostName);
  
  var aSettings = ApplicationRuntimeSettings('d78876ff-cbdb-4786-bbf3-0264c4937d11');
  if (aSettings != null) {
    $('#ViewAsFamilyId').html(aSettings.ViewAsFamilyId);
    $('#ViewAsFamilyName').html(aSettings.ViewAsFamilyName);
    $('#MyApplicationId').html(aSettings.Id);
    $('#MyApplicationName').html(aSettings.Name);
    $('#MyApplicationProperties1').html(JSON.stringify(aSettings.PropertyValues));
  }
}


CSS

.NoCSS  {}



The rendered application will output the following