我对 powerapps 很陌生,但边走边学。有没有办法将以下 if 语句写成一个语句?(这样它只会在我的共享点列表中创建一个项目,而不是为每个 if 语句创建单独的项目)。我正在努力这样做,因为每个 If 语句都有不同的默认结果。
If(
IsEmpty(MondayCombo.SelectedItems),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{Monday: DataCardValue82.Text}
),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{
Monday: Concat(
MondayCombo.SelectedItems,
Value,
", "
)
}
)
);
If(
IsEmpty(TuesdayCombo.SelectedItems),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{Tuesday: DataCardValue83.Text}
),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{
Tuesday: Concat(
TuesdayCombo.SelectedItems,
Value,
", "
)
}
)
);
If(
IsEmpty(WednesdayCombo.SelectedItems),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{Wednesday: DataCardValue84.Text}
),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{
Wednesday: Concat(
WednesdayCombo.SelectedItems,
Value,
", "
)
}
)
);
If(
IsEmpty(ThursdayCombo.SelectedItems),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{Thursday: DataCardValue85.Text}
),
Patch(
ChangeOfService,
Defaults(ChangeOfService),
{
Thursday: Concat(
ThursdayCombo.SelectedItems,
Value,
", "
)
}
)
);