Seite 1 von 1

Objekt ausblenden

Verfasst: 19.12.2020, 13:34
von Firefox
Hallo zusammen,

ich möchte mit folgendem Script das eine oder andere Objekt ausblenden lassen, was aber so als ODER-Funktion nicht funktioniert:

if (Servicereport.Technician.Datum_U.rawValue = F_Start_Day_tx.rawValue); {
this.resolveNode("F_End_Time_tx").presence = "visible";
this.resolveNode("F_End_Day_tx").presence = "invisible";
}

or

if (Servicereport.Technician.Datum_U.rawValue != F_Start_Day_tx.rawValue); {
this.resolveNode("F_End_Time_tx").presence = "invisible"
this.resolveNode("F_End_Day_tx").presence = "visible";
}

Wer kann mir hierzu weiterhelfen?

Re: Objekt ausblenden

Verfasst: 19.12.2020, 17:40
von BAlheit
Try this:

Code: Alles auswählen

if (Servicereport.Technician.Datum_U.rawValue == F_Start_Day_tx.rawValue); {
  this.resolveNode("F_End_Time_tx").presence = "visible";
  this.resolveNode("F_End_Day_tx").presence = "invisible";
} else {
  this.resolveNode("F_End_Time_tx").presence = "invisible"
  this.resolveNode("F_End_Day_tx").presence = "visible";
}

Re: Objekt ausblenden

Verfasst: 19.12.2020, 18:05
von Firefox012
Hello BAlheit,
leider bekomme ich hier beim Syntax prüfen einen Fehler cin Zeile 4 bei " } else{ "gemeldet:
Unfortunately I get an error when checking the syntax in line 4:

if (Servicereport.Technician.Datum_U.rawValue == F_Start_Day_tx.rawValue); {
this.resolveNode("F_End_Time_tx").presence = "visible";
this.resolveNode("F_End_Day_tx").presence = "invisible";

} else {
this.resolveNode("F_End_Time_tx").presence = "invisible"
this.resolveNode("F_End_Day_tx").presence = "visible";
}


Welche Ursache könnte hier vorliegen?
What could cause this error?

Re: Objekt ausblenden

Verfasst: 04.01.2021, 09:37
von huber
Das Semikolon nach der geschwungenen Klammer entfernen, sollte den Fehler beheben;

Code: Alles auswählen

if (Servicereport.Technician.Datum_U.rawValue == F_Start_Day_tx.rawValue); {