Add / delete instances to a multiple value (SOLVED)

If you think that something doesn't work in Aware IM post your message here
Post Reply
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Add / delete instances to a multiple value (SOLVED)

Post by jannes »

How to add (or delete) an instance (via business rule) to a multiple allowed value (list) of an attribute ?

Example :
When a Person has a multiple allowed attribute : Department
How to add the 2nd department ?
Or just delete a department of the "list"

Something like :
Person.ob_Department = Person.ob_Department + ThisDepartment
Last edited by jannes on Mon Jul 12, 2021 8:38 am, edited 1 time in total.
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Add / delete instances to a multiple value

Post by Jaymer »

INSERT Department IN Person.ob_Department
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Add / delete instances to a multiple value

Post by customaware »

I generally do it a little differently depending on if the Reference is Single or Multiple..

So.... in the situation above, INSERT Department IN Person.ob_Department, ob_Department is Singular so I would ALWAYS use..

Person.ob_Department = Department

However, if the Departments Reference is multiple... ie... a Person can belong to many Departments....

Person.pm_Departments for example... then I would use

INSERT Department IN Person.pm_Departments
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
jannes
Posts: 100
Joined: Tue Jul 02, 2019 12:22 pm

Re: Add / delete instances to a multiple value (SOLVED)

Post by jannes »

Thnx!
Post Reply