Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Event_ls = [
- sdate = "24/05/2019",
- stime = "09:00:00",
- discription = "Razhodka",
- spoint = "Varna",
- epoint = "Arbanasi"
- ]
- & PersonEmails = ["ivan.ivanov@gmail.com", "rosen@abv.bg", "iva.gerasimova@gmail.com", "mihail.vanov@gmail.com"]
- & EquipmentLs = ["voda", "hrana", "telefon"]
- & Event_oid = :$mnt8:cp_event8.create (Event_ls)
- & MissingEmails = compute list (Email) where
- (
- Email = m:lst.member (PersonEmails)
- & if
- PeresonOid = t:obj.find ($mnt8:cp_prsn8, [email = Email])
- then
- (
- :$mnt8:cl_event_prsn8.create ([l_event = Event_oid, l_prsn = PeresonOid])
- & fail
- )
- )
- & for_all
- Equipment = m:lst.member (EquipmentLs)
- do
- (
- if
- t:obj.find ($mnt8:cp_equipment8, [name = Equipment, EquipmentOidDB], [])
- then
- EquipmentOid = EquipmentOidDB
- else
- EquipmentOid = :$mnt8:cp_equipment8.create ([name = Equipment])
- & :$mnt8:cl_event_equipment8.create ([l_event = Event_oid, l_equipment = EquipmentOid])
- )
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement