cancel
Showing results for 
Search instead for 
Did you mean: 

MDM assignment expression problem

Former Member
0 Kudos

Hi,

I am working with the MDM Data Manager, trying to create a very simple assignment expression but I don't find any information about its syntax...

For instance, I have a field called 'phone number' in my repository. If 'phone number' is null I want to assign it a default value, for instance, 111. Very simple!

So, I have assigned to 'assignment field' the value 'phone number' and to 'assignment' the next expression:

IF(IS_NULL(phone number), 111)

Finally, when I execute this assignment a error message appears: the assignment opperation failed.

Could someone help me?

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member205403
Active Contributor
0 Kudos

Hi Marta,

Try with

<b>IF(IS_NULL(PHONE NUMBER),TRUE)

PHONE NUMBER = 111

</b>

and let me know the result.

Thanks,

<b>Shiv Prashant Dixit</b>

Former Member
0 Kudos

Hi Shiv,

with

IF(IS_NULL(PHONE NUMBER),TRUE)

PHONE NUMBER = 111

a syntax error appears...

and IF(IS_NULL(PHONE NUMBER), PHONE NUMBER = 111) appears the next message: 'there were no assignment errors' but the field PHONE NUMBER doesn't change...

PHONE NUMBER has been declared as integer.

Thanks

Message was edited by:

Marta Sánchez

former_member205403
Active Contributor
0 Kudos

Hi Marta,

The correct assignment expression as per your requirement is the same that you mentioned

<b>IF(IS_NULL(PHONE NUMBER),111,PHONE NUMBER)</b>

I checked this and it is working fine.

But initially you said:-

"Finally, when I execute this assignment a error message appears: the assignment opperation failed."

Please check your <b>assignment field </b> in the<b> properties</b> pane of <b>assignment tab</b>.It should be "phone number",otherwise the operation will fail.

<b>Please try the above.</b>

Hope it will solve your problem.Let me know the results.

Thanks,

<b>Shiv Prashant Dixit</b>

Former Member
0 Kudos

Hi Shiv,

I have proved the assignment expression: IF(IS_NULL(PHONE NUMBER),111,PHONE NUMBER) with the value "phone number" in the assignment field in the properties pane.

I am absolutely sure that the assignment expression is correct but I have some problems when I execute it:

1. In the records pane, I select one record with the value of <b>phone number null</b>, then I right-click on it and choose assignments->execute, and then a error message appears -> "the assignment operation failed".

2. If I select one record with the value of phone <b>number not null</b> appears the next one message: "there were not assignments errors".

3. If I prove the assignment expression: IF(IS_NULL(PHONE NUMBER),111,222) and I select one record with the value of phone number not null, and I execute the assignment again, it fails again.

Always the assignment field in the properties pane of assignment tab is "phone number".

Phone number has been declared in the MDM console:

-phone number, integer, [df], [uf]

-name: phone number

-code: phone number

-type: intenger

-required: no

-writable Once:no

-matrix: normal

-sort index: normal

-keyword: none

-display Field: yes

-Unique field: yes

-Calculated: no

Thank you again,

Marta.

Former Member
0 Kudos

The syntax for your requirement goes like this:

IF(IS_NULL(Phone Number), 111, 222).

The reason your assigment is failing is because the way you have defined your field in the console.

Change the Unique Field property to <b>NO</b>.

The assignment per your syntax fails because of the unique constraint failing.

Hope this helps,

Please mark helpful answers

Ads.

Former Member
0 Kudos

Hi Ads,

I change the Unique field property to NO without any successful result...

Could it really be a configuration problem of the table detail or field detail parameters in the MDM Console?

Could you give me a simple example of table with some simple fields and its corresponding detail configurations that allows me to run this assignment successfully?

Thanks in advance,

Marta

Former Member
0 Kudos

Hello Marta,

first thing: Are you using this Assignment in the Main Table or a subtable? Second thing: Did you set the correct assignment field and are there no constraints on this field, like length, correct data type etc.?

Last thing I recognized: The Assigment works fine, if you're not executing the assignment an the same record where you declared the assigment! Sounds funny but worked for me...!

Hope this helps,

Andreas

Message was edited by:

Andreas Markert

Former Member
0 Kudos

Hi

I think you need to update the patch. I had this problem and i noted that in patch01 (MDM 5.5), validateion expression editor is launched instead of assignment expression editor. So the assignment only succeeds if the new value provided is the same as the old value. It essentially is validation.

Please update your patch to 4 which is now available in marketplace and it sould work. Please let me know if it helps.

Regards,

Yasir Rizwan Saqib