This content has been marked as final. Show 5 replies
You cannot achieve what you are trying to do with the script below as you cannot set members in the varValue Array in an import script and you are implemeting the logic in the wrong dimension. What require is an import script that is associated with the Custom1 dimension that checks the Value of the Source Account (parsed out of the strRecord input parameter) and then assigns None as the returned value for the Custom1 source value where the Account starts with "4". Then in your mappings None will simply map to [None]
I am not a technical guy, but correct me if i have understood this right.
I will have to call account and custom 1 and then evaluate if account codes starts with "4" than account codes remains as it is but custom 1 changes to [None].
It willl be help if you can write the script and channelise me thought process.
In your import format on the Custom1 dimension add an import script to the Expression column.1 person found this helpful
Your source record strRecord has the Account value in it you just need to parse it out using DW.Utilities.fParseString. Then check if it starts with a "4" and if so have the script return "None" or else return the value in strField i.e. your original Custom1 source value.
There are plenty of examples of these techniques in the FDM Admin guide in the scripting section. Have a go at writing it yourself it will be much more useful in the long run than me writing the script here.
I checked the Import format, C1 information is not picked from source file. It is tagged as FA02 from C1 Map under "like".
Therefore I have written the below script within "like"
If left (varvalues (13),1) = "4" Then
varvalues (19) = "[None]"
varvalues (19) = "FA02"
but while exporting it shows as missing value for C1.
Replace varvalues(19)with Result then it will work