Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: epetrouHello,
Ive been trying to do a nested if formula but it isnt working properly,although i dont get a error..It just doesnt seem to go in the third if in the nested IFs..i cant seem to spot any problem with the code..my bet is ,that theres something wrong with the format of my columns in the file.. Sample file attached in the post.
What im trying to do is create a final column based on the data of 4 other columns. For example if the first column is not blank i copy the non-blank data in the final one, the blank data of column1 and the non blank data from column 2 copied into the final column and so on.
There is a possibility that more than 1 column could have data, but i only want to keep the data in the order i put them inside the if function. Here is the code ( i also change the format of these 4 columns to string as it wasnt working as unicode)
tmp1_str=madness_tmp1.str()
tmp2_str=madness_tmp2.str()
code_str=MADNESS_CODE.str()
if Channel!="" then
final_madness=Channel else
if tmp1_str!="" then
final_madness=tmp1_str else
if tmp2_str!="" then
final_madness=tmp2_str else
if code_str!="" then
final_madness=code_str else
final_madness="NOT VF SHOPS/CORNERS_DOES NOT EXIST IN TARGET FILES"
emit *,final_madness
Attachments:
query error.zip