Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there a way to create a new field with data values in them in the Script?
My example is this. I have 3 lists (sharepoint. List 1, List 2, list 3) being pulled. List 1 is the main List that has a Legal name as the key field. List 2 and 3 all are linked via the Legal Name. I also have a field in the lists called Title Name that basically tells me which list i am pulling from, be it List 2 or List 3 yet list 1 does not have this field. How can I combine the Title lists in List 2 and 3 into list 1? Or combine the lists all together so I can click and sort by them. If I change all the Title Lists to the same field name it becomes another key field which i do not want to do.
Any help is greatly appreciated.
Nick
It depends on your data and what you want. You can join the list tables or maybe you can use mapping tables and the applymap function.
You could use the join statement to join the tables into one table. You can then use the fields in the combined table to create new fields. Something like this:
List1:
Load
LegalName, fieldB, fieldC, ..etc
from ...list1...;
join
Load
LegalName, fieldP, fieldQ, ..etc
from ...list2...;
join
Load
LegalName, fieldX, fieldY, ..etc
from ...list3...;
ResultTable:
Load
LegalName,
fieldP & '-' & fieldX as fieldPX,
fieldA, fieldB, fieldP,...etc
resident List1;
drop table List1;