在我们的 PowerApps 表单中,我们的提交按钮的 DisplayMode 由检查所有必填字段是否已完成的公式确定。
If (
And(
Or(DPIAForm.Mode=FormMode.Edit,DPIAForm.Mode=FormMode.New),
Not IsBlank(TitleField.Text),
Not IsBlank(DescOfInitiativeField.Text),
DateRaisedField.SelectedDate <> Date(
1900,
01,
01
),
Not IsEmpty(PersonalDataChoiceField.SelectedItems.Value),
Not IsEmpty(SpecialCatChoiceField.SelectedItems.Value),
Not IsEmpty(ChildrensDataChoiceField.SelectedItems.Value),
Not IsEmpty(CriminalChoiceDataField.SelectedItems.Value),
Not IsEmpty(SourcesOfDataChoiceField.SelectedItems.Value),
Not IsEmpty(NumberOfIndividualDataSubjectsChoiceField.SelectedItems.Value),
Not IsEmpty(LawfulBasisChoiceField.SelectedItems.Value),
Not IsBlank(ProviderField.Text),
Not IsEmpty(NewTechnologyChoiceField.SelectedItems.Value),
Not IsEmpty(DataEvaluatedOrScoredChoiceField.SelectedItems.Value),
Not IsEmpty(DecisionsMadeAutomaticallyChoiceField.SelectedItems.Value),
//Not IsBlank(KindofDecisionsMadeAutomaticallyField.Text),
If(DecisionsMadeAutomaticallyChoiceField.SelectedItems.Value ="Yes", Not IsBlank(KindofDecisionsMadeAutomaticallyField.Text), "" ),
Not IsEmpty(IndividualNotAwareOfPersonalDataCaptureChoiceField.SelectedItems.Value),
Not IsEmpty(DataTransferredOutsideEEAChoiceField.SelectedItems.Value),
Not IsBlank(WhoWillHaveAccessToDataField.Text),
Not IsEmpty(MonitoringIndividualsChoiceField.SelectedItems.Value),
Not IsEmpty(CriminalChoiceDataField.SelectedItems.Value),
Not IsEmpty(MonitoringIndividualsChoiceField.SelectedItems.Value),
Not IsEmpty(DataRetentionPlanChoiceField.SelectedItems.Value),
Not IsBlank(RetentionPlanForPersonalDataField.Text),
Not IsBlank(RetentionPlanForSensitiveDataField.Text),
Not IsBlank(RetentionPlanForChildrensDataField.Text),
Not IsBlank(RetentionPlanForCriminalConvictionDataField.Text),
Not IsEmpty(SupplierDueDiligenceDoneChoiceField.SelectedItems.Value),
Not IsEmpty(GDPRCompliantContractWithAll3rdPartiesChoiceField.SelectedItems.Value),
StatusDataField.Text = "Draft"
),
DisplayMode.Edit,
DisplayMode.Disabled)
我们遇到问题的部分是中间的公式:
If(DecisionsMadeAutomaticallyChoiceField.SelectedItems.Value ="Yes", Not IsBlank(KindofDecisionsMadeAutomaticallyField.Text), "" ),
在这里我想测试一下,如果用户在下拉/选择字段中选择了“是”,ecisionsMadeAutomaticallyChoiceField
如果是这样,那么该字段KindofDecisionsMadeAutomaticallyField
不能为空白/空,以便启用“提交”按钮...
但是我收到一个错误Invalid argument type onIf(DecisionsMadeAutomaticallyChoiceField.SelectedItems.Value ="Yes"
我也试过:
If(DecisionsMadeAutomaticallyChoiceField.SelectedItems(1)
那么在我们的公式中执行此操作的正确方法是什么?