Data Load in Asset table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2023 07:04 AM
I have a AQCC Name(u_aqcc_name) List type field(it reference to u_aqcc table) in Asset table and it holds one or more AQCC Names data with comma(,) separated. if I load data thru Transform Maps, if the AQCC Name exist(ex: AQCCTest01) it should be updated and if the AQCC Name(ex: AQCCTest02) does not exist it should be ignore. I tried with below code but it is not working.
 
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var isValidId = true;
var isMandatory = false;
if (!source.u_imp_aqcc_name.nil()) {
isMandatory = true;
}
if (isMandatory == false) {
if (source.u_imp_aqcc_name.nil()) {
ignore = true;
status_message = "Record has not been created due to blank value in AQCC Name column";
}
}
if (isMandatory == true) {
var aqccName= source.u_imp_aqcc_name;
isValidId = new VFdpdExport().isActiveValidId('u_aqcc', 'u_active=true^u_displayname=' + aqccName);
if (isValidId == false) {
ignore = true;
status_message = aqccName + " Record has not been created due to invalid value in AQCC Name column";
}
}
})(source, map, log, target);
It is always ignore the record and showing the message as 'Record has not been created due to invalid value in AQCC Name column'. I am suspecting the total AQCC Name consider as a one String(AQCCTest01, AQCCTest02) hence it's ignoring.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2023 03:09 PM
I hope my question is clear, if it's not clear please do let me know. Still my issue is not resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 07:30 AM
AQCCTest01 is exist so the record should insert in Asset table with AQCC Name(u_aqcc_name) field data. AQCCTest02 is not exist so this need to be ignore it. I am getting below error.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 07:38 AM
But you are passing both value for single row so either that row will be updated or ignored.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 08:08 AM
Hi Anil,
Yes, I need to pass multiple(it may be one or two or three) values in single row.
1. The row contains one AQCC Name and if the AQCC Name is invalid just example: AQCCTest02 then whole record insert or update should be ignored
2. The row contains many AQCC Name, means it's a combination of exist and doesnt exist then record should be create or update with exist AQCC Names and it should be ignore the invalid one's. Because it is creating gost record in u_aqcc table if the AQCC Name doesn't exist.
So I need to achieve the above scenario's. Could you help me with the code.