cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
gme-eg
Level: Powered On

PowerApps Gallery Navigation Help

I created Time Card App and grouped the gallery screen by "Employee", after i did the grouping control i cannot:

1- navigate to details screen "I need each employee to navigate to his related records"

2- when i click on submit form it do nothing.

 2019-01-22 12_17_50-.jpg

2019-01-22 12_19_29-Program Manager.jpg

Please help as i stucked in this for days.

4 REPLIES 4
StefanR
Level: Powered On

Re: PowerApps Gallery Navigation Help

Hi,

 

i think first of all you should fix your bugs. 

This can be a reason for the problem that the form is not submitted.

 

If you see tiny red circles on the screen then press the stethoscope on the upper right corner.

After pressing this little icon, a screen with warnings and errors will appear on the right side.

 

Maybe you can post a screenshot of the listed errors?

 

Best regards

Stefan

gme-eg
Level: Powered On

Re: PowerApps Gallery Navigation Help

here is the error I set the Item Property as "Gallery2.Selected" but it gives me nothing when i submit the form. but note that i made grouping control by "Emloyee" to the gallery the I stated the data source as "GroupBy(Table1, "Employee", "User")" Table1=my data source

I think the groping controls in the gallery also what is making the confilct in the navigation to details screen as well.

 

Can you support in that..

2019-01-22 15_05_53-.jpg

StefanR
Level: Powered On

Re: PowerApps Gallery Navigation Help

Thank you for your quick reply.

 

It's not so easy to find a solution, but i will try my best.
I hope that i have understood your problem...

 

If you group your data in Gallery2, you cannot refer to the selected item with Gallery2.selected because you will receive a set of data instead of a record.

 

If you group by an Employee, then - if i understood correctly - the Employee is you key.
There are a lot of datarecords for each Employee, right?

 

Gallery2-DataSource:
Employee 1 - Rec 1
Employee 1 - Rec 2
Employee 1 - Rec 3
Employee 2 - Rec 1
Employee 2 - Rec 2
Employee 3 - Rec 1
Employee 3 - Rec 2
Employee 3 - Rec 3

 

The UI shows

Employee1 >
Employee2 >
Employee3 >

 

Scenario 1: New Form
Now, The Employee selects his record to fill out Form1 to create a new datarecord.
The Form ist connected to the same datasource thats behind your Gallery2.items, right?
If so, you dont need the reference to Gallery2.selected, because the Submit will create a new record.
Maybe you will set the Employee-Field of the Form to Gallery2.Selected.Employee.

 

Scenario 2: Display or Edit Form
If you want to edit a record, you first have to clarify which record you want to edit or show, because each Gallery2 Item can consist of a bunch of records.

 

In case of Employee 1 its:
Rec 1
Rec 2
Rec 3

 

If i'm still on the right path, i would recommend a second Gallery "galEployeeRecords" on a second screen to select the Record, the Employee want to edit or display. You can use the same datasource like in Gallery2 and set the Items-Property to "galEployeeRecords.Items.Eployee or EmployeeId or somthing like that.

 

Now the Employee selects himself in Gallery2, picks the record from "galEployeeRecords"

The Display or Edit-Form will receives it's Item from galEmployeeRecords.Selected.RecordID.

I hope that you can follow my thoughts a bit...

 

If so, i would be happy if you would mark this answer as a solution to your problem.

 

Best regards
Stefan

 

 

gme-eg
Level: Powered On

Re: PowerApps Gallery Navigation Help

Thanks a lot @StefanR i think it is a good idea already I have anther screen with gallery "Gallery 1" I connetcted it to my data source "Table1" and and set the Item Property as "Gallery1.Alltems.Employee".

 

the result is:

1- Navigation to details screen not works the screen empty.

2-  submit issue not solved when i clicked on the submit button no action but the new thing i got this error message.

Submit.png

 

please let me know if i missed any step.