在我的Google表格的“流程验证”标签中,我有一个数据验证单元格,其中有多个选项可供选择。
选择的选项会在“主提取”选项卡中触发QUERY
。
为了使其“万无一失”,我在“流程验证”标签中添加了几列复选框,以标记流程各阶段的完成情况(例如,每周Campaign CSV导出-该阶段需要用户将提及的报告导出为CSV)。 如果前一阶段尚未完成(未选中复选框),则用户将无法继续提取下一个文件。
我需要的是
如果用户从数据验证中选择了“每周活动”,并且尚未填写源文件和“每周活动”字段以显示以下消息:
”,请澄清“源文件”和“每周广告系列ID”字段 “流程验证”标签中的内容已正确填写。”
如果用户选择其他报告-例如未完成“每周活动”报告的所有四个阶段(未选中所有四个复选框(= TRUE))的“更新潜在客户地址”,将显示以下消息:
”,请澄清“每周广告系列CSV导出”,“每周广告系列” CSV导出保存”,“每周活动SF追加”和“每周活动” 成功错误TD上载的过程已完成。“
如果上一过程的所有阶段都已完成,则应触发所需的QUERY
。
到目前为止,我的想法是:
=IF(IF(AND(fileToExtract = "Weekly Campaign",
sourceFile <> "",
weeklyCampaignID <> ""),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID",sourceFile_labelRange,FALSE)),
"SELECT Col1, '" & weeklyCampaignID & "', 'Sent'
WHERE Col1 IS NOT NULL
LABEL '" & weeklyCampaignID & "' 'Campaign ID',
'Sent' 'Status'",1),
"Please, clarify if the 'Source File' and 'Weekly Campaign ID' fields in the 'Process Validation' tab have been filled correctly."),
IF(IF(AND(fileToExtract = "Update lead address",
weeklyCampaign_CSV_Export = TRUE,
weeklyCampaign_CSV_Export_Save = TRUE,
weeklyCampaign_SF_Append = TRUE,
weeklyCampaign_Success_Error_TD_Upload = TRUE),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Street", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("City", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("State/Province", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Zip/Postal Code", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country (RB)", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country", sourceFile_labelRange,FALSE),1),
"SELECT Col1,
Col2,
Col3,
Col4,
Col5,
Col6,
Col7
WHERE Col1 IS NOT NULL", 1),
"Please, clarify if the 'Weekly Campaign CSV Export', 'Weekly Campaign CSV Export Save', 'Weekly Campaign SF Append' and 'Weekly Campaign Success Error TD Upload' processes have been completed.")))
以上公式导致#VALUE!
错误-Function IF parameter 1 expects boolean values. But 'Please, clarify if the 'Source File' and 'Weekly Campaign ID' fields in the 'Process Validation' tab have been filled correctly.' is a text and cannot be coerced to a boolean.
。
当我尝试像这样单独运行它们时:
=IF(IF(AND(fileToExtract = "Weekly Campaign",
sourceFile <> "",
weeklyCampaignID <> ""),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID",sourceFile_labelRange,FALSE)),
"SELECT Col1, '" & weeklyCampaignID & "', 'Sent'
WHERE Col1 IS NOT NULL
LABEL '" & weeklyCampaignID & "' 'Campaign ID',
'Sent' 'Status'",1),
"Please, clarify if the 'Source File' and 'Weekly Campaign ID' fields in the 'Process Validation' tab have been filled correctly."),"Dull")
或者像这样:
=IF(IF(AND(fileToExtract = "Update lead address",
weeklyCampaign_CSV_Export = TRUE,
weeklyCampaign_CSV_Export_Save = TRUE,
weeklyCampaign_SF_Append = TRUE,
weeklyCampaign_Success_Error_TD_Upload = TRUE),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Street", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("City", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("State/Province", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Zip/Postal Code", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country (RB)", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country", sourceFile_labelRange,FALSE),1),
"SELECT Col1,
Col2,
Col3,
Col4,
Col5,
Col6,
Col7
WHERE Col1 IS NOT NULL", 1),
"Please, clarify if the 'Weekly Campaign CSV Export', 'Weekly Campaign CSV Export Save', 'Weekly Campaign SF Append' and 'Weekly Campaign Success Error TD Upload' processes have been completed."),"EVEN DULLER")
我分别遇到以下#VALUE!
错误:
Error
Function IF parameter 1 expects boolean values. But 'Please, clarify if the 'Source File' and 'Weekly Campaign ID' fields in the 'Process Validation' tab have been filled correctly.' is a text and cannot be coerced to a boolean.
并且:
Error
Function IF parameter 1 expects boolean values. But 'Please, clarify if the 'Weekly Campaign CSV Export', 'Weekly Campaign CSV Export Save', 'Weekly Campaign SF Append' and 'Weekly Campaign Success Error TD Upload' processes have been completed.' is a text and cannot be coerced to a boolean.
合并时实际上是相同的错误。
我该如何解决?
P.S。
请告诉我是否需要一些虚拟数据,但是请记住,我受公司安全限制,使我无法与公司以外的任何人共享任何工作表。
答案 0 :(得分:1)
第一个IF
的论据放错了位置。
代替:
=IF(IF(AND(fileToExtract = "Weekly Campaign",
sourceFile <> "",
weeklyCampaignID <> ""),
QUERY(QUERY({sourceFile_dataRange}, ect...
并且:
IF(IF(AND(fileToExtract = "Update lead address",
weeklyCampaign_CSV_Export = TRUE,
weeklyCampaign_CSV_Export_Save = TRUE,
weeklyCampaign_SF_Append = TRUE,
weeklyCampaign_Success_Error_TD_Upload = TRUE),
QUERY(QUERY({sourceFile_dataRange}, ect...
应该是:
=IF(fileToExtract = "Weekly Campaign",
IF(AND(sourceFile <> "",
weeklyCampaignID <> ""),
QUERY(QUERY({sourceFile_dataRange}, ect...
并且:
IF(fileToExtract = "Update lead address",
IF(AND(weeklyCampaign_CSV_Export = TRUE,
weeklyCampaign_CSV_Export_Save = TRUE,
weeklyCampaign_SF_Append = TRUE,
weeklyCampaign_Success_Error_TD_Upload = TRUE),
QUERY(QUERY({sourceFile_dataRange}, ect...
整个QUERY
看起来像这样:
=IF(fileToExtract = "Weekly Campaign",
IF(AND(sourceFile <> "",
weeklyCampaignID <> ""),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID",sourceFile_labelRange,FALSE)),
"SELECT Col1, '" & weeklyCampaignID & "', 'Sent'
WHERE Col1 IS NOT NULL
LABEL '" & weeklyCampaignID & "' 'Campaign ID',
'Sent' 'Status'",1),
"Please, clarify if the 'Source File' and 'Weekly Campaign ID' fields in the 'Process Validation' tab have been filled correctly."),
IF(fileToExtract = "Update lead address",
IF(AND(weeklyCampaign_CSV_Export = TRUE,
weeklyCampaign_CSV_Export_Save = TRUE,
weeklyCampaign_SF_Append = TRUE,
weeklyCampaign_Success_Error_TD_Upload = TRUE),
QUERY(QUERY({sourceFile_dataRange},
"SELECT Col" & MATCH("Lead ID", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Street", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("City", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("State/Province", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Zip/Postal Code", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country (RB)", sourceFile_labelRange,FALSE) & ",
Col" & MATCH("Country", sourceFile_labelRange,FALSE),1),
"SELECT Col1,
Col2,
Col3,
Col4,
Col5,
Col6,
Col7
WHERE Col1 IS NOT NULL", 1),
"Please, clarify if the 'Weekly Campaign CSV Export', 'Weekly Campaign CSV Export Save', 'Weekly Campaign SF Append' and 'Weekly Campaign Success Error TD Upload' processes have been completed.")))