Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to drop fields while also renaming. All the fields I do not want are renamed as numbers, I tried to create an if statement that would drop the unwanted fields but it is not working. Let me know if anyone has any ideas!
Here is my script:
Initiative__c:
LOAD
*;
Select *
FROM Initiative__c;
FieldMapInitiative__c:
MAPPING
LOAD Field,
Rename
FROM
[lib://AttachedFiles/FieldMap.xlsx]
(ooxml, embedded labels, table is Initiative__c)
WHERE len(Rename)>0
& if(Field=num(0-100),drop);
Rename Fields using Initiative__c;
May be this
FieldMapInitiative__c:
MAPPING
LOAD Field,
Rename
FROM
[lib://AttachedFiles/FieldMap.xlsx]
(ooxml, embedded labels, table is Initiative__c)
WHERE len(Rename)>0 and IsText(Field);
it is still showing the fields, it must be reading the numbers as text.
I can also change the names in the field map if that helpful
How about this?
FieldMapInitiative__c:
MAPPING
LOAD Field,
Rename
FROM
[lib://AttachedFiles/FieldMap.xlsx]
(ooxml, embedded labels, table is Initiative__c)
WHERE len(Rename)>0 and not IsNum(Num#(Field));