cancel
Showing results for 
Search instead for 
Did you mean: 

Create assignment and using lookup table

siowfong_chen
Contributor
0 Kudos

Hi! I have raised similar question long time ago so please bear with me as I am exploring other options which I want to confirm in this forum whether it is workable.

Original requirement: To search for certain words in the Short Description field of the item and then populate an alias text on the Special Search Term field for searching.

Purpose: Very often, an item has a description which the user might not search on. So, we want to put alternative wordings in an alias field that is also opened for keyword search. Example, notepad in the short description can also be found if one searches for writing paper.

Current solution we have in mind is to create an assignment that looks like this

(IF((FIND(Short Description,"NOTEPAD")<>0),"WRITING PAPER"))

This syntax works but it becomes complicated when I have hundreds of texts to look up for. In this case, I will have to either write a nested assignment or multiple assignments and assign to the workflow for processing.

I have also tried to use the Set Value Conversion Filter in Import Manager to populate the Alias field. However, this is not as nice a solution as I can only use Find and Replace based on the short description field and so my final text value in the Alias field is actually the short description value with the text replaced by the alternative text.

Now, the option that I want to explore here is through the use of a lookup table containing the from value and to value and have the system uses the lookup table for searching and populating the alias text we want.

For example, in the lookup table we have

Source FInal

NOTEPAD WRITING PAPER

BOOTS SHOES

I created an assignment with the following syntax:

(IF((FIND(Short Description,Alias.SourceText)<>0),Alias.FinalText))

When I tried this, it didn't work. Hence, I would like to find out whether I am on the right track here.

Appreciate any help on this.

Cheers!

SF

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member205403
Active Contributor
0 Kudos

Hi,

I doubt if assignment can achieve this requirement because you may have thousands of records. if some how yes, then this kind of assignment will be very complex.

is it possible for you to get Alias Text field data from source as a field?? this will be the best solution.

Another solution which I can think of is to use JAVA API. you may create a simple java program to do this kind of assignment But as we do not know your requirement fully, so i am not sure whether it will fit in your case or not.

Regards,

Shiv

siowfong_chen
Contributor
0 Kudos

Hi Shiv,

Unfortunately, this information does not come from the source. It is an attempt by the business to improve searching internally by providing more keywords for searching on the alias field. Re Java API, I thought it may not be worthwhile since there are only around 20 alias 'assignments' at the moment.

Cheers!

SF

former_member205403
Active Contributor
0 Kudos

Hi,

if it is just just 20 Alias then you can try assignment but still it will be little big . But is business sure that it will not increase in Future?

If it is just a matter of 20 Alias then manually updating Alias field may be considered as an option. for example You can use free form expression to search for all record which contains "Notebook" and then you can do a mass update by selecting all records and modifying Alias field as "writing paper" in one shot. But one limitation is this will make your process manual and will be required on regular basis.

Regards,

Shiv

siowfong_chen
Contributor
0 Kudos

Thanks fr the suggestion. I guess we would prefer assignment at this point in time so that we can include the assignment in a workflow for automatic update.

Cheers!

SF

Former Member
0 Kudos

Hi SF,

I created an assignment with the following syntax:

(IF((FIND(Short Description,Alias.SourceText)0),Alias.FinalText))

As per my understanding, MDM does not support such kind of Assignments as of now or in other words Its just not Possible.

But, As you said, there are only around 20 alias 'assignments' at the moment.

So, i think below is best solution which fits into your requirement.

You should have this Alias field of Type Look-up Flat to say Aliases in main table not of type Text.

This Aliases Look-up flat table has only one field of Type Text which has values 1 to 20.

I am giving you example with 2 values, similarly you can do it for 20 values.

Say it has two values as shown below:

WRITING PAPER

SHOES

You will create an assignment in main table and set Property Assignment field = Alias from drop down.

In Assignment Expression write in below manner,

IF(FIND(Short Description, "NOTEPAD"), Alias (WRITING PAPER), IF(FIND(Short Description, "BOOTS"), Alias (SHOES)))

Alias (WRITING PAPER), you will select from Look-ups Tab wherein you will select Alias then a pop-up window

will open for selection:, Here Choose Look-up Value WRITING PAPER, as soon as you will select it a value Alias (WRITING PAPER) comes in your Expression. lly, for Alias (SHOES)

Note: Here, WRITING PAPER and SHOES Should be within Square Brackets, as i am not able to write here so instead i put Parenthesis( ).

It is working fine at my end. Kindly revert with the result if you have any issue.

Thanks and Regards,

Mandeep Saini

siowfong_chen
Contributor
0 Kudos

Thanks all for the wonderful suggestions. At least I know I have not missed out any functions and will have to stick with assignment as a solution for now.

Cheers!

SF