JSON column formatting – reference column not in view

Hi we have Sharepoint online site using old template and switched list to use modern experience.

Problem is with JSON formatting, because some things do not work as expected.

  1. Unable to use/reference any site column in fashion [$ CustomColumnName] which are not used in the view. Error given is: Failure: CustomColumnName was not found on the data object.

  2. Referencing column [$ ID] gives two possible errors: empty like there is no data or Failure: Cannot read property ‘valueOf’ of null

I have tested out of the box examples from Microsoft site and many more and the behaviour is the same.

Does it have to do something that the site is not completely on modern design? Did you experienced this? Thanks

Linking also the same issue somebody else created, I have same behaviour. https://github.com/SharePoint/sp-dev-column-formatting/issues/19

AutoNumber Column Task ID restart every year

I am trying to create a column with increment number when adding a new task, but restart every year, for instance in year of 2017, i would like to Task ID looks like this: 2017-001, 2017-002, 2017-003 and so on.

Also it will restart back to 001 when the date is 2018, for instance in year of 2018, Task ID will look like this: 2018-001, 2018-002, 2018-003

How would i do this? Please help!

SSRS Column Visibility

I have created a SSRS table that i have created with SharePoint data source. I have more than 30 column with yes and no value in that SharePoint list. I am trying to count the yes values, and then display top 10 columns on this SSRS report. I am able to pull the true count but however not able to only show top ten. enter image description here Should i create a new table to pull information from this table on the same report?


How would you do it if L1, L2, L3, etc… were not from one field but are all different fields?

How do you populate people picker column data with multiple values using email via JavaScript?

I’m using SharePoint 2013, my people picker column is set to accept multiple values.

I am able to post to a list item and add a single person to the column using the following method:

function updatePeopleColumn(listName, itemID) {     var siteUrl = _spPageContextInfo.webServerRelativeUrl,         clientContext = new SP.ClientContext(siteUrl),         currentWeb = clientContext.get_web(),         oList = currentWeb.get_lists().getByTitle(listName),         userObj = currentWeb.get_siteUsers().getByEmail('email@ddress.com');      this.oListItem = oList.getItemById(itemID);      oListItem.set_item('People', userObj);      oListItem.update();      clientContext.load(oListItem);     clientContext.executeQueryAsync(Function.createDelegate(this, this.onPeopleQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); }  function onPeopleQuerySucceeded(sender, args) {     console.log('Person added to People.', sender, args); }  function onQueryFailed(sender, args) {     console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); }  updatePeopleColumn('ListName', 99999); 

What I have not been able to do is gather multiple people using currentWeb.get_siteUsers().getByEmail(’email@ddress.com’), adding those to an array and passing that value to the column, like so:

function updatePeopleColumn(listName, itemID, emailAddresses) {         var siteUrl = _spPageContextInfo.webServerRelativeUrl,             clientContext = new SP.ClientContext(siteUrl),             currentWeb = clientContext.get_web(),             oList = currentWeb.get_lists().getByTitle(listName),             users = [],             i;          for (i = 0; i < emailAddresses.length; i++) {             var userObj = currentWeb.get_siteUsers().getByEmail(emailAddresses[i]);              users.push(userObj);         }          this.oListItem = oList.getItemById(itemID);          oListItem.set_item('People', users);          oListItem.update();          clientContext.load(oListItem);         clientContext.executeQueryAsync(Function.createDelegate(this, this.onPeopleQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));     }      function onPeopleQuerySucceeded(sender, args) {         console.log('People added to People.', sender, args);     }      function onQueryFailed(sender, args) {         console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());     } updatePeopleColumn('ListName', 99999, ['email@ddress.com', 'email2@ddress.com']); 

So how do I pass multiple values to the people column using emails?

SharePoint 2013 – Set column color based on list header

I’ve a unique requirement for one of my lists. In order to make it easier to read I’ve used this css code to alternate the color of the columns.

table.ms-listviewtable td:nth-child(even) { background: #D0E4F5;} 

Now this is great for most of the columns . However I’ve some special columns that need to be different colors (like yellow or green). And due to the views and some other javascript I cannot use something like

table.ms-listviewtable td:nth-last-child(2){ background: lightyellow;} 

Would anyone be able to write some javascript that looks at the column header and then sets the background-color of the column?

So if header contains ‘Total’ color the entire column red.

Thanks

Nombre de tablas en mayusculas usando anotacion @Column en BD postgree sql

Tengo JPA importado y linkado a una base de datos y cada vez que levanto la aplicación me genera las tablas y sus respectivas columnas.

El tema es que estoy tratando de respetar las convenciones de tener los nombres en mayusculas de SQL. Pero mediante la anotacion @Column no he sido capaz de obtener el resultado deseado. He probado lo siguiente:

@Table(name = "AIRPORTS") @Table(name = "\"AIRPORTS\"") 

La segunda sentencia va en base a lo que lei de aquí pero no logro el objetivo

https://www.postgresql.org/message-id/CAE3TBxyjqaQkg55pKdq12LynGwi9a2tU1wk_c3xn%3DWyO-fCa9A@mail.gmail.com

¿Alguna sugerencia?

How to get a value from a column using XSLT

I’m trying to figure out how to configure a custom xslt template for use with a content query web part, specifically the content type of the list item.

I don’t know at all what I’ve doing and there aren’t really great tutorials on XSLT. If you know of one please share it.

I’ve gone into the ItemStyle.xsl file and created my own template based on the existing out of the box WithDocIcon. I started out simple. I added this near the top:

    <xsl:variable name="Foo" select="'Hello world'" /> 

And then this down in the markup part of the template

        <div class="bar">             <xsl:value-of select="$  Foo" />         </div> 

And this wrapped the Hello world in a div on the page. So that is successful and working.

But now I want my Foo variable to pull its value from the content type of the list item. I realize the single quotes inside the double quotes are what are telling the template that the select is a string. I thought maybe I could put the column name there, but that doesn’t work.

<xsl:variable name="Foo" select="ContentType" /> 

I looked at this Microsoft documentation and the thing I figured might be what I need is OuterTemplate.GetColumnDataForUnescapedOutput? I tried implementing it like this.

<xsl:variable name="Foo">   <xsl:call-template name="OuterTemplate.GetColumnDataForUnescapedOutput">     <xsl:with-param name="Name" select="'ContentType'" />    </xsl:call-template> </xsl:variable> 

And that didn’t work. I also tried it without the single quotes and for other columns like Title. Nothing worked.

I then found this MS documentation that mentions:

By default, the XSL style sheet that controls the presentation of the Content By Query Web Part renders the Title, Description, ImageUrl, and LinkUrl columns (if present) of the items that the query returns. The Web Part renders the ImageUrl column and the LinkUrl column as an image and as a hyperlink, respectively. The Content By Query Web Part uses XSL style sheets to render these columns by default.

So I edited the CQWP and updated the following two properties

    <property name="CommonViewFields" type="string">ContentType,Text;</property>     <property name="DataColumnRenames" type="string">ContentType,Description</property> 

This works! My understanding is the CommonViewFields is telling the webpart to get the content type and then assigning its value to the Description variable, but then I don’t have my Description anymore! I tried renaming it to my own names and that didn’t work either.

So is there a way to get the Title, Description, ImageUrl, and LinkUrl as well as add my own columns?