Hello,
I have a below data set in excel. Data is import from line 1. So Alteryx created the default field Name like Field1,Field2,Field3 etc.
| F1 | F2 | F3 | F4 | F5 |
| ABC | EFG | PQR | XYZ | MNO |
| ABC | EFG | PQR | XYZ | MNO |
My requirement is the selection of field in output file should be dynamic. If i passed the count 2 from text then it should select only first two columns i.e. F1 and F2 rest should be ignore. If i pass the count 4 then it should select first 4 columns i.e. F1,F2,F3 and F4 from above table.
Once the column selected, the number of columns i need to rename from F1,F2,F3 header with Column1, Column2, Column3 etc.
How can i achieve this? Could you please help!
Your help is really appreciated .
Thank you in advance.
Solved! Go to Solution.
@alt_tush
How about using a Dynamic Select tool as below.
Hello Qiu,
Thank you for prompt response. I point i missed to add. After selection of number of columns i need to rename the F1,F2,F3 header with Column1, Column2, Column3 etc.
Then use a Dynamic Rename - something like Replace([_CurrentField_], "F" ,"Column") should work
Hello Alexnajm,
Thank you for your prompt respose. Yes it works.