Search

1 to 10 of 14
Sort by

Discussion Post
Using SPL code to evaluate Change field form

I want that when the user clics the save button in order to create a change order, the function evaluates than if the category field is fill with a development category and the root cause is blank, display a message warning that if "you choose this category it must be set with a root cause, in others cases it will be ok (for example if the category is another accepts or not a root cause)" This is my function I want to achive with spl code: file.mod MODIFY chg (PRE VALIDATE zValidateRootCause() 4200 FILTER(EVENT("INSERT"));); file.spl chg::zValidateRootCause(...) ( string zmsgA21; ( if (category == '401314' && rootcause == '' ) ( zmsgA21=format("For this category must be a select a root cause",chg ref num,requestor); set error(1); set return data(zmsgA21); return; ) ) ) But when I create a change order of development area, the function doesn't evaluate the values I put on the respective fields




Discussion Post
How to use Split function in Spel Code

I have a string who I want to get separate (split) but I wish to use both sides of resultant string in different fields in Service Desk. Can u help me how to obtain this? For example: I have the original string variable as: twostrings = Consult ticket 02 ; string resume; //and the function...


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

-- Original Message: Sent: 12-11-2019 12:37 PM From: Joel Barger Subject: Site Defined Condition to Identify User Access Type in a site defined condition you can set it up so that you can observe the value of an attribute. is there a way to expose this attribute so rather than having a hard coded value in a spel script we have the ability to configure the value and re-use this if need be in other places


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

in a site defined condition you can set it up so that you can observe the value of an attribute. is there a way to expose this attribute so rather than having a hard coded value in a spel script we have the ability to configure the value and re-use this if need be in other places


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

Of course you can check id of access type if you like. Please explain in more detail what do you mean by: provide just the access type value so that way we can observe


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

Question, instead of returning true or false is there a way to provide just the access type value so that way we can observe that rather than hardcoding it in?


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

Thank you so much Sigitas I'll give this a whirl.


Discussion Reply
RE: Site Defined Condition to Identify User Access Type

Hello, Code of macro: uuid who; object zaccess; send wait(0,top object(), "call attr", "cnt", "current user id"); who=msg[0]; send wait(0, top object(), "call attr", "api", "get access for contact", (string)who); if (msg error()) ( logf(ERROR, "get access for contact failed %s",msg[0]); ) else ( zaccess = msg[0]; logf(SIGNIFICANT, "access: %s",zaccess.sym); ) if (zaccess.sym==" Analyst MGR ") ( set return data(TRUE); ) else ( set return data(FALSE); )