- This topic is empty.
- AuthorPosts
-
- 05/21/2015 at 3:05 am #7078
AnonymousParticipantHi 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
- 05/21/2015 at 8:29 am #7424
AnonymousParticipantHi , 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?=
- 05/21/2015 at 9:11 am #7081
AnonymousParticipantHi 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
- 05/21/2015 at 10:03 am #7082
AnonymousParticipant[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 🙂 -
05/28/2015 at 4:04 am #7084
AnonymousParticipantHi 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
- Add a HTML From Web Part into the page;
- Click the “Source Editor…” in the edit mode.
- Put the below script into the Text Editor and save:
n
n
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
- 05/28/2015 at 4:42 am #7083
AnonymousParticipantI 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?
- 06/02/2015 at 10:47 am #7085
AnonymousParticipantHi , 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
- 06/03/2015 at 8:18 am #7087
AnonymousParticipantHi 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
- 06/03/2015 at 8:56 am #7088
AnonymousParticipantFantastic 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!
- 06/10/2015 at 11:44 am #7100
AnonymousParticipantOK, 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.
- 06/11/2015 at 1:37 am #4672
AnonymousParticipantEssentially 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..
- 06/11/2015 at 1:37 am #7101
AnonymousParticipantNever mind, I solved it by adding a 2,3 & 4 to the other QAIMID bits and now they all work great.
-
- AuthorPosts
You must be logged in to reply to this topic.