Clear(colAutoFormDS);
ForAll(
Gallery5.AllItems,
Collect(
colAutoFormDS,
{
colProjectName: tiProjectName.Text,
colEquipment: ThisRecord.Equipment,
colComplexity: Dropdown2.SelectedText.Value,
colClassOrInstance: Dropdown2_1.SelectedText.Value,
colNumUnits: tiNumUnits.Text,
colUnitCost: tiCost_3.Text,
colIO: tiIO.Text,
colTotalCost: tiCost.Text
}
)
);
If(
EditMode,
ForAll(
colAutoFormDS,
If(
!IsBlank(ThisRecord.colEquipment),
Patch(
AutoData,
LookUp(
Filter(
AutoData,
dbProjectName = tiProjectName.Text
), dbEquipment = "Test"
),
{
dbProjectName: colProjectName,
dbEquipment: colEquipment,
dbComplexity: colComplexity,
dbClassOrInstance: colClassOrInstance,
dbNumUnits: colNumUnits,
dbUnitCost: colUnitCost,
dbIO: colIO,
dbTotalCost: colTotalCost
}
),
Patch(
AutoData,
Defaults(AutoData),
{
dbProjectName: colProjectName,
dbEquipment: colEquipment,
dbComplexity: colComplexity,
dbClassOrInstance: colClassOrInstance,
dbNumUnits: colNumUnits,
dbUnitCost: colUnitCost,
dbIO: colIO,
dbTotalCost: colTotalCost
}
)
)
),
ForAll(
colAutoFormDS,
Patch(
AutoData,
Defaults(AutoData),
{
dbProjectName: colProjectName,
dbEquipment: colEquipment,
dbComplexity: colComplexity,
dbClassOrInstance: colClassOrInstance,
dbNumUnits: colNumUnits,
dbUnitCost: colUnitCost,
dbIO: colIO,
dbTotalCost: colTotalCost
}
)
)
);
Navigate(scrAutoHome);
ForAll(
Gallery5.AllItems As _Items,
Patch(
AutoData,
If(
!IsBlank(_Items.Equipment) && EditMode,
LookUp(
AutoData,
dbProjectName = _Items.tiProjectName.Text && dbEquipment = "Test"
),
Defaults(AutoData)
),
{
dbProjectName: _Items.tiProjectName.Text,
dbEquipment: _Items.Equipment,
dbComplexity: _Items.Dropdown2.SelectedText.Value,
dbClassOrInstance: _Items.Dropdown2_1.SelectedText.Value,
dbNumUnits: _Items.tiNumUnits.Text,
dbUnitCost: _Items.tiCost_3.Text,
dbIO: _Items.tiIO.Text,
dbTotalCost: _Items.tiCost.Text
}
)
);
Navigate(scrAutoHome);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.