Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About iljas

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you for reply, i tried use your method but still have no success. Probably because i tried modify this line: z_upd_val("cr", wc, 1, 1, "outage_type", outage_type); since i am realy green in this, i tried use send_wait method, but got errors like " Missing object to send to " or unknown function. Can you help me? And one more thing, since there is possibility that TRIGGERS can do harm to, these are that we used for previous functions: POST_VALIDATE z_copy_outage_type_from_parent() 400004 FILTER(EVENT("INSERT UPDATE") && parent{}); POST_VALIDATE z_copy_outage_type_to_children() 400005 FILTER(EVENT("INSERT UPDATE") && outage_type{}); Are they ok for the function that i try to use? Thank you for help and regards
  2. Hello, i am a new SPEL user and need your help. Idea is to update child outage_type (only if it's empty) from parent and only if parent is "Closed/Resolved" From what i have right now is code to update(rewrite) child outage type on every change in pratent: cr::z_copy_outage_type_from_parent(...) { string method; method = "cr::z_copy_outage_type_from_parent()"; logf(SIGNIFICANT, "Start spel %s for ticket %s", method, this.ref_num); //save information about outage type from parent send_wait(0, this, "call_attr", "outage_type", "set_val", this.parent.outage_type, "SURE_SET" ); logf(SIGNIFICANT, "Konec spel %s for ticket %s", method, this.ref_num); } -------------------------------------------------------------------------------------------------- cr::z_copy_outage_type_to_children(...) { string method, wc; int c_count, i; object c_list, group_leader, c_dob; method = "cr::z_copy_outage_type_from_parent()"; logf(SIGNIFICANT, "Start spel %s for ticket %s", method, this.ref_num); wc = format("parent = '%s'", this.persistent_id, this.outage_type); send_wait(0, top_object(), "call_attr", "cr", "sync_fetch", "MLIST_STATIC", wc, -1,0); c_count = msg[1]; c_list = msg[0]; if (c_count > 0) { for(i = 0; i < c_count; i++) { send_wait(0, top_object(), "get_co_group"); group_leader = msg[0]; //load child ticket send_wait(0, c_list, "dob_by_index", "DEFAULT", i, i); c_dob = msg[0]; //save outage_type info send_wait(0, group_leader, "checkout", c_dob); send_wait(0, c_dob, "call_attr", "outage_type", "set_val", this.outage_type, "SURE_SET" ); send_wait(0, group_leader, "checkin"); } } logf(SIGNIFICANT, "End of spel %s for ticket %s", method, this.ref_num); } I tried several costumizations but only thing that i got was errors Can you help me please? Thank you and regards
  • Create New...