
Announcements
Hi All,
i want to disable the import button if their is any blank values in the gallery?
why for some reason if their is a blank value in any control the patch does not pick it up and does not save it in data source so next best thing is to disable the button till all fields are used.
screenshot:
gallery item:
With(
{
RowCollection: Filter(
Split(TextInput2.Text, Char(10)),
!IsBlank(Value)
)
},
ForAll(
Sequence(CountRows(RowCollection)),
Patch(
Last(FirstN(RowCollection, Value)),
{rowIDNumber: Value}
)
)
)
controls in gallery:
BU_Postcode.Text,BU_Locality.Text,Bu_DOB.Text,Bu_NHC.Text,BU_PInfo.Text,label33.Text
Thank you 😀
Manage to get it working
Import Button Onselect:
If(
CountRows(
Filter(
Gallery1.AllItems,
!IsBlank(BU_Postcode.Text) &&
!IsBlank(BU_Locality.Text) &&
!IsBlank(Bu_DOB.Text) &&
!IsBlank(Bu_NHC.Text) &&
!IsBlank(BU_PInfo.Text) &&
!IsBlank(Label33.Text)
)
) = CountRows(Gallery1.AllItems),
DisplayMode.Edit,
DisplayMode.Disabled
)