I want to auto populate Address field with street, city, state/province and zip/postal code from the location table?

Shiva prasad t
Tera Guru

I have a 2 reference fields on catalog item. which is referring to cmn_location table.

If we select any location from the location table on location field, then that location street, city, state/province and zip/postal code should populate on Address field.

I tried by catalog data lookup definition. it won't work because we cannot popup 4 valuse into 1 field at a time.

Any help will be appreciated

Thank you

Shiva

1 ACCEPTED SOLUTION

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Here is sample script, you just Concatenate all of them in one field

https://community.servicenow.com/community?id=community_question&sys_id=5f7c143fdb3e2b00d6a102d5ca961981

https://community.servicenow.com/community?id=community_question&sys_id=78abd1e31b78901017d162c4bd4bcb90

Concatenate examples

https://community.servicenow.com/community?id=community_question&sys_id=64c206811b42c1509337ece6b04bcbad

https://community.servicenow.com/community?id=community_question&sys_id=d4c77bdadbfe1f801cd8a345ca9619dd

Lastly you have written 2 reference fields ? if you are expecting Address to be reference field then you cannot achieve this requirement, Address has to be multi line text variable

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

View solution in original post

1 REPLY 1

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Here is sample script, you just Concatenate all of them in one field

https://community.servicenow.com/community?id=community_question&sys_id=5f7c143fdb3e2b00d6a102d5ca961981

https://community.servicenow.com/community?id=community_question&sys_id=78abd1e31b78901017d162c4bd4bcb90

Concatenate examples

https://community.servicenow.com/community?id=community_question&sys_id=64c206811b42c1509337ece6b04bcbad

https://community.servicenow.com/community?id=community_question&sys_id=d4c77bdadbfe1f801cd8a345ca9619dd

Lastly you have written 2 reference fields ? if you are expecting Address to be reference field then you cannot achieve this requirement, Address has to be multi line text variable

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab