on 2021 Jul 02 2:57 PM
Hi IDM ers
i have a custom text boolean(Presentation) attribute ZMX_CONTRACTOR whose value depends on if MX_FS_WORK_CONTRACT_ID is populated or not.
if populated value = 1 if empty value=0
I use it in the search user form as a checkbox for contractor search.
what would be best way to implement?
i tried below sql for attribute values >sql query . it doesnot update in IDM. the syntax is Oracle specific:
select count(*) from dual where exists (select * from idmv_VALlINK_EXT2 where MCATTRNAME = 'MXFS_WORK_CONTRACT_ID' )
any help would be appreciated
Request clarification before answering.
Hi Prasad,
the changetype in both passes should be modify! AFAIK there is no changetype insert and changetype delete means that you delete the object which is the MX_PERSON you selected.
I assume that you are using IDStore self for your selections?
Did you already add the custom attribute ZMX_CONTRACTOR and make it available for entrytype MX_PERSON?
The assignment in the add pass should be ZMX_CONTRACTOR: 1 because there is no value set for %ZMX_CONTRACTOR% which would result into the attribute (flag) not being set.
The assignment in the delete pass should be ZMX_CONTRACTOR: %% to empty/delete the attribut (flag).
As for your SQL-Queries please test them thoroughly and then use them for your sources. I cannot help much in this regard because I have a different data set.
If you have further questions please add a screenshot of your passes for source and destination. And please be more specific about the problems you have.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex:
thanks for quick reply.
yes there is a change type "insert" . it works. the reason for insert is- the record is missing when i query view IDMV_VALUE_BASIC and only appears in sql on view when "Modify Identity" form is submitted after populating "MX_FS_WORK_CONTRACT_ID" .and record is deleted when i remodify Identity with empty string in "MX_FS_WORK_CONTRACT_ID". so unless i use another view the setting of "ZMX_CONTRACTOR" works.
im more interested in tuning the resetting pass of the "ZMX_CONTRACTOR" flag in job
Answer to your questions
I assume that you are using IDStore self for your selections? YES
Did you already add the custom attribute ZMX_CONTRACTOR and make it available for entrytype MX_PERSON? YES
The assignment in the add pass should be ZMX_CONTRACTOR: 1 because there is no value set for %ZMX_CONTRACTOR% which would result into the attribute (flag) not being set. YES THANKS I FIGURED THAT
The assignment in the delete pass should be ZMX_CONTRACTOR: %% to empty/delete the attribute (flag). YES THANKS
I also wanted to try the Process/TASK/Script way of doing things. any help there would be appreciated.
Thanks
Prasad
I went ahead and created a job for inserting record for ZMX_contractor . need help with fine tuning job especially the deletion of the record when attribute MX_FS_WORK_CONTRACT_ID is reset to blank
should i use distinct?
should i use a different view? the insert part worked good
job type: To IdentityStore
pass: setContractorflag
source:
select A.MSKEY , A.AttrName, A.aValue from IDM_OPER.IDMV_VALUE_BASIC A where A.ATTRNAME= 'MX_FS_WORK_CONTRACT_ID' and not exists(select 1 from IDM_OPER.IDMV_VALUE_BASIC B where A.mskey = B.mskey and B.ATTRNAME = 'ZMX_CONTRACTOR' )
Destination:
MSKEYVALUE : %MSKEYVALUE%
ZMX_CONTRACTOR: 1 or %ZMX_CONTRACTOR%
Changetype : insert
pass: resetContractorflag( to delete the record when attribute MX_FS_WORK_CONTRACT_ID is reset to blank)
source:
select distinct A.MSKEY , A.AttrName, A.aValue from IDM_OPER.IDMV_VALUE_BASIC A where A.ATTRNAME='ZMX_CONTRACTOR' and not exists(select 1 from IDM_OPER.IDMV_VALUE_BASIC B where A.mskey = B.mskey and B.ATTRNAME = 'MX_FS_WORK_CONTRACT_ID' )
Destination:
MSKEYVALUE : %MSKEYVALUE%
ZMX_CONTRACTOR: %ZMX_CONTRACTOR%
Changetype : delete
any input appreciated!!
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
I am not sure how to answer your question, because I think it's somehow ambiguous.
First, you need to get your SQL sorted out. It should iterate on the apropriate entrytypes that should get this custom attribute. For these entrytypes you would need the MSKEYVALUE to work with in IDM. Also, the view VALLINK is not ideal for this. You should use a VALUE view instead for a value attribute.
Second, I would populate the custom attribute ZMX_CONTRACTOR using a job with a toIdentityStore-Pass. Source would be the SQL-statement used with SAP IDM DB. As Destination you would have MSKEYVALUE - %MSKEYVALUE%, changetype - modify, ZMX_CONTRACTOR - %<Value from your SQL as result>%.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
14 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.