How to map string choice field to integer choice field using transform source script ?

Dinesh9
Giga Contributor

Hi All ,

 I am having a string choice field on import set table (table a)and i want to map the field to the target table's (table b) integer choice field.For Eg if in the import set table the status is disposed then  on the target table the value will be mapped as retired. If anyone knows please help me out.

find_real_file.png

 

Thanks,

Dinesh Kumar G

12 REPLIES 12

Allen Andreas
Administrator
Administrator

Hi,

In the script you would  just need to build out your mapping for that.

Something like (EXAMPLE):

if (source.status == 'Deployed') {
return -2;
}

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hello,

Yes, you will need to use common JavaScript knowledge to complete the rest. My example script above covers just one example, but you would want to use that as a base, and expand from there.

It is hopeful you could at least take it from here, unless you have future questions, then let me know.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

I just wanted to check-in on this and see if you needed any more assistance. If my reply above helped answer your question and guide you correctly. Please mark it as Correct.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

I just wanted to check in on this. If my reply helped guide you correctly, please mark it as Helpful & Correct.

Thank you!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!