Transform map don't update records in alm_hardware table

JohnDF
Mega Sage

Hi everyone,

 

here is my coalesce trasnformap source script, but the records in the alm_hardware table with the configuration item which starts with the u_servername source are not getting upgraded?

 

JohnDF_0-1679394084649.png

I'am miss something?

 

What could be the problem here? Thanks for help in advance.

1 ACCEPTED SOLUTION

JohnDF
Mega Sage

The poblem was the target field. It should be sys_id and not configuration item.

View solution in original post

3 REPLIES 3

AnveshKumar M
Tera Sage
Tera Sage

Hi @JohnDF ,

Can you see any error for the records after transforming or is it just Skipped?

And, I see you are using while(alm.next()) in GlideRecord section and you are just retuning the sys_id of a record (ofcourse it should be one record only, as it is coalesce field). I'm just trying to understand why are you using "while" instead of "if", any specific reason?

 

Thanks, 

Anvesh

Thanks,
Anvesh

@AnveshKumar M thanks for reply,

 

I changed to if. But the records get still created and not updated. No errors. Just inserts

 I used while because there can be multiple target records who will be found with the query becasue more records starts witthe u_servername and should be updated with the source field. But in the excel the u_servername is unique.

JohnDF
Mega Sage

The poblem was the target field. It should be sys_id and not configuration item.