Loading...

qListView and Lync Presence Indicator Question

qListView and Lync Presence Indicator Question

  • This topic is empty.
Viewing 11 reply threads
  • Author
    Posts
    • #7078
      Anonymous
      Anonymous
      Participant

      Hi Novafix,

      n

      The Presence setting is just for the ‘User’ type field. It cannot work in the normal field.

      n

      But I may have a workaround for you by configuring the custom field, you can try to change the Calculated Value as below:

      n

      <span><img src="/_layouts/images/imnhdr.gif" onload="IMNRC('<%EMail%>')" id="<%ID%>" name="imnmark<%ID%>" ShowofflinePawn = "1" border="0" height="12" valign="middle" /><a href="mailto:<%EMail%>"><%Name%></a></span>

      n

      The <%Email%> field is referring to the email address.

      n

    • #7424
      Anonymous
      Anonymous
      Participant

      Hi , thanks for the reply.  That's got the indicator in place and hovering over it pulls the info and shows the presence accurately but unless you hover over it everyone looks offline…any ideas as to why?=

    • #7081
      Anonymous
      Anonymous
      Participant

      Hi Novafix,

      n

       

      n

      I am sorry, I missed the ID property, you must set the ID to “QAIMID<%ID%>”, the script will set the user’s status according to the ID. You can try the below script again:

      n

      <span><img src="/_layouts/images/imnhdr.gif" onload="IMNRC('<%EMail%>')" id="QAIMID<%ID%>" name="imnmark<%ID%>" ShowofflinePawn = "1" border="0" height="12" valign="middle" /><a href="mailto:<%EMail%>"><%Name%></a></span>

      n

    • #7082
      Anonymous
      Anonymous
      Participant

      [quote user=""]

      n

      Hi Novafix,

      n

       

      n

      I am sorry, I missed the ID property, you must set the ID to “QAIMID<%ID%>”, the script will set the user’s status according to the ID. You can try the below script again:

      n

      <span><img src="/_layouts/images/imnhdr.gif" onload="IMNRC('<%EMail%>')" id="QAIMID<%ID%>" name="imnmark<%ID%>" ShowofflinePawn = "1" border="0" height="12" valign="middle" /><a href="mailto:<%EMail%>"><%Name%></a></span>

      n

      n

      [/quote]

      n

       

      n

      THis worked like a charm!  Thanks so much for your help 🙂
    • #7084
      Anonymous
      Anonymous
      Participant

      Hi Novafix,

      n

       

      n

      I think because you are putting the same ‘ID’ value into the script. You may noticed that this script is suing the “QAIMID<%ID%>” as the ID property, if you put two web parts into one page, the <%ID%> may be the same.

      n

      I would like to wrap this script as a JavaScript to generate the ID property value. Please try the below steps:

      n

        n

      1. Add a HTML From Web Part into the page;
      2. n

      3. Click the “Source Editor…” in the edit mode.
      4. n

      5. Put the below script into the Text Editor and save:
      6. n

      n

      <script>

      n

      function createMailField(mail,displayField){

      n

      return "<span><img onload=\"IMNRC('"+mail+"')\" id=\"QAIMID"+(1+Math.random()*10000).toString(16)+"\" name=\"imnmark"+(1+Math.random()*10000).toString(16)+"\" ShowofflinePawn = \"1\" border=\"0\" height=\"12\" valign=\"middle\" class=\"presenceIndicator\" src=\"/_layouts/images/imnhdr.gif\"/><a href=\"mailto:"+mail+"\"></a>"+displayField+"<span>";

      n

      }

      n

      </script>

      n

              4. Edit the Custom field in the qListView,put the below code into the “Calculated Value”:

      n

      <script>createMailField('<%Mail%>','<%People%>')</script>

      n

              5. Save all.

      n

       

      n

       Now two web parts should work in the same page.

      n

       

      n

    • #7083
      Anonymous
      Anonymous
      Participant

      I have a follow up question – I have one site where I have 2 quest parts using this feature but the Lync presence indicator shows as green in 1 and grey in the other where the names are duplicated.  If I hover over the grey icon it shows everything correctly.

      n

      Do you know a way around this?

    • #7085
      Anonymous
      Anonymous
      Participant

      Hi , thanks for the reply.  Iäm not 100% sure where you mean with that Custom Field. Do you mean to create a new column in the referenced list and use that calculated value? If so what should I call it?  Sorry, I'm not a great programmer…

      n

       

    • #7087
      Anonymous
      Anonymous
      Participant

      Hi Novafix,

      n

       

      n

      No, the Custom Field is under the “Display Fields” setting. you can click “Add Field” button there, and then, you can edit this custom field, you can put this script into ‘Calculated Value’:

      n

       

      n

      <script>createMailField('<%Mail%>','<%People%>')</script>

      n

       

      n

    • #7088
      Anonymous
      Anonymous
      Participant

      Fantastic stuff.  This worked great.  I was in the right area but had left the tick in the check box so it was messing the display up.  It all works great now.

      n

      Thanks again for your help! 

    • #7100
      Anonymous
      Anonymous
      Participant

      OK, a new problem has surfaced with this.  If I save everything and press refresh it stops working as the Custom1 Field blanks itself….if I put a tick in the box it doesn't blank itself and survives through refreshes.  Is there a way to force the custom field to retain that setting without me putting a tick in the box as this causes it to be shown above the rest of the web part.

    • #4672
      Anonymous
      Anonymous
      Participant

      Essentially I have a qListView web part that I’m using a Custom Display for and the Lync presence indicator does not appear when it pulls a Name field (with presence indicator). 

      n

      If I don’t use the Custom display and just stick with using ‘Display Fields’ and put the tick in the box for ‘enable presence’ then it works fine.

      n

      My question is do you know if adding the ‘enable presence’ bit of the normal display is available in the custom dosplay?

      n

      So in normal the field view is

      n

      <Field Name=”Name” Presence=”true” GroupExpanded=”false” />

      n

      and in Custom Display I have something like this

      n

      <a href=”mailto:<%EMail%>”><%Name%></a><br>

      n

      I’m hoping it’s a quick fix..

    • #7101
      Anonymous
      Anonymous
      Participant

      Never mind, I solved it by adding a 2,3 & 4 to the other QAIMID bits and now they all work great.

Viewing 11 reply threads

You must be logged in to reply to this topic.