1) I have a gallery , by default I am not able to see the first row, I have to click "+" to see first row. How can I make it visisble on the load of the page ?
I have to click "+" for this to appear
2) The code in my Save &Close button is
Once I click , the values are stored in a string and sent to another screen,
Set(AllPrincipalString,Concat(Gallery1.AllItems,Concatenate(TextInput1.Text,"; ",TextInput2.Text,"; ",TextInput3.Text,"; ",TextInput4.Text,"; ",TextInput5.Text,"; ",TextInput6.Text,"; ",TextInput7.Text,"; ",TextInput8.Text,"; ",TextInput9.Text," | ")));
Notify("Principal Added successfully!",NotificationType.Success);
Navigate(Screen1,ScreenTransition.Cover);
But I want the user to user to prevent from submitting if my TextInput1.Text, is empty how can i do that ?
Solved! Go to Solution.
@JayashreeKrish may i suggest you set the displaymode of the button based on your rule.
Select the display button and set its display mode to
If(
CountRows(
Filter(
YourGallery.AllItems,
IsBlank(yourTextBox)
)
) > 0,
DisplayMode.Disabled,
DisplayMode.Edit
)
now when its empty the user will get a disabled button
and once there is data it will be active
hope thi shelps
I tried with
ForAll(Gallery1.AllItems,If(Not(IsBlank(TextInput1.Text)),Edit,Disabled))
in DisplayMode of Button
But it shows - Enum expected
Hi @JayashreeKrish when you create the collection for the gallery, add blanks to it. By default, your gallery is empty and i assume you user collect to add the rows.
This will add a row with blank for two items
ClearCollect(colMyInput,{p_name:Blank(), p_title:Blank()})
add that to the OnVisible property of the screen. you will get this when the screen opens
Now for the second part. you are using a gallery, is the plan to have more than one entry? once i know this i will suggest a way forward. your variable collecting the string that way from the gallery is a bit troublesome, id like to get more into that.
hope this helps you
@JayashreeKrish may i suggest you set the displaymode of the button based on your rule.
Select the display button and set its display mode to
If(
CountRows(
Filter(
YourGallery.AllItems,
IsBlank(yourTextBox)
)
) > 0,
DisplayMode.Disabled,
DisplayMode.Edit
)
now when its empty the user will get a disabled button
and once there is data it will be active
hope thi shelps
For my Question 2,
Once my gallery is loaded,
If I add value in Principal Name field , I should be able to save all the Principal Names in a field in Screen 1 separated by semicolon
If it is empty I should I should not be able to save anything in a field in Screen 1 , it should be blank as it is
@JayashreeKrish you may want to investigate to save the collection itself and then patch your datasource with the collection. a good place will be the "+" icon. have a look at this whihc is a very good piece by @mdevaney PATCH Multiple Records In Power Apps 10x Faster - Matthew Devaney
Hi @rubin_boer
For my first question.
I have a canvas app with two screen
On screen 1, if i click on a button it will go to screen 2 which is having gallery
In screen 2 i have a gallery , with clear , save&close , close button.
on load of screen it should show the first entry if it is blank (it is showing since i put the below code)
But if I had entered some value ,
when i come to screen 2 from screen 1 , it should show the value
But it is not shown as expected when i use the below code
If I use the below it is always blank - ClearCollect(colMyInput,{p_name:Blank(), p_title:Blank()})
How do I avoid that ?
is it possible to do validation for item level in gallery.
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |