Tabellenlayout SPSActivityClassBase_Incidents

Post Reply
jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 25. May 2010, 10:53

Guten Tag,

ich möchte in dem Tabellenlayout auch die Computernamen anzeigen, die ich bei Assets im Ticket mit auswähle.
leider komme ich mit =T(SPSActivityClassIncident).Asset.Name nicht weiter.
Habe mir die Tabelle angesehen. Die Computernamen stehen leider nicht in der AssetClassBase sondern in der ComputerClassBase. Wie kommen ich jetzt über diesen Weg auf den Computernamen.
Weiterhin will ich auch noch eine Batch mit dem Computernamen als Parameter aufrufen, daher ist das Datenfeld sehr wichtig!
Denn

Code: Select all

function RunProg2()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%=base.DataObject["SPSActivityClassIncident"]["Asset"].ToString()%>", 1)
}
ergibt nur die ID

Kann mir jemand weiterhelfen?

Gruß
Jan

TomO
Posts: 61
Joined: 04. Dec 2009, 10:24
Location: Berlin
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by TomO » 25. May 2010, 11:18

Hi,

Ich habs hier in meinem SPSActivityClassBase - Tabellenlayout so:

=T(SPSActivityClassIncident).Asset.T(SPSComputerClassBase).Name

und funktioniert auch.
Den zweiten Teil deiner Frage hab Ich jetzt nicht ganz verstanden.

jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 25. May 2010, 11:31

Hey Danke erstmal,
hat so geklappt.
Zur zweiten Frage:
Ich möchte über Script im Formular SPSActivityTypeIncident.allgemein eine Batchdatei aufrufen, die den Assetnamen der Störung als Parameter mit übergibt. Jetzt habe ich gehoft, dass das auch so funktioniert, doch wenn ich das wie folgt eingebe, wird das Formular nicht mehr angezeigt.

Code: Select all

function RunProg2()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%=base.DataObject["SPSActivityClassIncident"]["Asset"]["SPSComputerClassBase"]["Name"].ToString()%>", 1)
}

top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(2,"00000000-0000-0000-0000-000000000000","Dameware Remote","RunProg2","/SPS/Images/icon16_dameware.png")
Kennst du dich auch mit den Functions aus

jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 25. May 2010, 11:36

Achso als Nachtrag noch im Computer Dialog geht das wunderbar, da greift Matrix ja direkt auf die richtige Klasse["SPSComputerClassBase"] zu:

Code: Select all

function RunProg()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("ping.exe -t <%=base.DataObject["SPSComputerClassBase"]["Name"].ToString()%>", 1)
}
 
function RunProg2()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%=base.DataObject["SPSComputerClassBase"]["Name"].ToString()%>", 1)
}
 
top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(1,"00000000-0000-0000-0000-000000000000","PING Computer","RunProg","/SPS/Images/icon16_client_network.gif")

top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(2,"00000000-0000-0000-0000-000000000000","Dameware Remote","RunProg2","/SPS/Images/icon16_dameware.png")

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 7965
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by Hendrik_Ambrosius » 25. May 2010, 12:09

Testen Sie mal ob Sie über diese Variablendefinition den Asset-Namen bekommen:
var Host= document.getElementById(SPSActivityClassIncidentAsset).value;
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 25. May 2010, 13:08

hab das jetzt so eingetragen, aber nach veröffentlichung wird der Dialog nicht mehr angezeigt.
Ist da noch ein Fehler?

var Host= document.getElementById(SPSActivityClassIncidentAsset).value;

function RunProg()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("ping.exe -t <%=base.DataObject["SPSActivityClassIncident"]["Asset"].ToString()%>", 1)
}

function RunProg0()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%=base.DataObject["SPSActivityClassIncident"]["Asset"].ToString()%>", 1)
}

function RunProg2()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%Host%>", 1)
}

function RunProg3()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteDameware.bat", 1)
}

top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(1,"00000000-0000-0000-0000-000000000000","PING Computer","RunProg")

top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(2,"00000000-0000-0000-0000-000000000000","Dameware Remote","RunProg2","/SPS/Images/icon16_dameware.png")

top.SPS.PropertyDialogContainer.ProxyPage.RegisterClienSideTask(3,"00000000-0000-0000-0000-000000000000","Dameware Remote manuell","RunProg3","/SPS/Images/icon16_dameware.png")

User avatar
Hendrik_Ambrosius
Moderator
Moderator
Posts: 7965
Joined: 13. Dec 2004, 23:10
Location: Adendorf/Lüneburg

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by Hendrik_Ambrosius » 25. May 2010, 13:14

Bin auch nicht so der Spezi für SQL Abfragen aber versuchen Sie es mal ohne SET, direkt die Abfrage in den Aufruf einbauen wie es bei Ihnen vorher auch war. Sonst müßte mal jemand anders helfen.
Hendrik Ambrosius / Senior Presales Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 GmbH | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 or of the support team.

jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 25. May 2010, 13:26

SO? --> leider auch keine Besserung..

Code: Select all

function RunProg0()
{
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.Run("C:\\Scripte\\RemoteControll.bat <%=document.getElementById(SPSActivityClassIncidentAsset).value%>",  1)
}
Hat jemand noch einen Tipp?

User avatar
tgrosch
Posts: 602
Joined: 14. Nov 2007, 16:34
Location: Fulda
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by tgrosch » 26. May 2010, 12:41

TomO wrote:Hi,

Ich habs hier in meinem SPSActivityClassBase - Tabellenlayout so:

=T(SPSActivityClassIncident).Asset.T(SPSComputerClassBase).Name

und funktioniert auch.
.
Vielen Dank! Nach so einer Funktion habe ich ebenfalls gesucht, mangels Training habe ich aber leider noch keinen tiefen Einblick in das System. Dazu habe ich aber eine Frage: Er zeigt jetzt in der Übersicht die Computer an. Kriege ich es auch irgendwie hin, dass er z.B. die Drucker anzeigt?

Viele Grüße

Tobias
Viele Grüße

Tobias
---
Empirum Echtsystem: v19 - 19.0.1 - Win 2012 R2 mit EPE 4.7.3 und UEM Agent 1905.1
Empirum Testsystem: v19 - 19.0.1 - Win 2012 R2 mit EPE 4.7.5 und UEM Agent 1906.1
Workplace Management Echtsystem: ServiceStore 9.1.0.2532 - Win 2012 R2
Workplace Management Testsystem: ServiceStore 9.1.0.2532 - Win 2016
MDM: Silverback 18.0.3.27
DB-Server: Win 2012 R2 mit SQL 2014

jlies
Posts: 76
Joined: 07. Dec 2009, 13:14
Location: Wunstorf
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by jlies » 26. May 2010, 12:56

Das geht wohl nur mit einer zweiten Spalte und dann mit

=T(SPSActivityClassIncident).Asset.Name

dann werden alle Namen der Assets die keine Computer sind angezeigt

Gruß
Jan

wkiefer
Posts: 6
Joined: 13. May 2010, 15:41
Contact:

Re: Tabellenlayout SPSActivityClassBase_Incidents

Post by wkiefer » 23. Jul 2010, 14:22

Hallo, es sollte auch mit einer Spalte gehen:

Ein Beispiel hier aus dem Tabellenlayout SPSAssetClassBase_Default
=Case When UsedInTypeSPSComputerType is not null Then T(SPSComputerClassBase).Name ELSE [Name] END

das müsste nur noch entsprechend umgeschrieben werden

Viel Erfolg
Wolfgang Kiefer

Post Reply

Return to “Service Desk”

Who is online

Users browsing this forum: No registered users and 6 guests