cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
OlaH
Level: Powered On

From one gallery to multiple forms (different datasources)

NoItemToDisplay500.pngIn a start screen gallery I want five buttons to navigate to five different forms. Now only the form with the same datasource as the gallery will show items. The other has "No item to display".  

 

How do get a value compatible with DataSource in "Item" of the different forms?

 
ItemError.png

 

OnSelect.pngMy two atempts 

I've tried to use varibles {MySelection:ThisItem}.  (see image)

 

I've also tried "Defaults('datasource')" as Items in the forms.

In that case the form i shown but not updated to the student result. Connected to the datasource but not to the selected student from the gallery.

 

About the app, scenario

The teacher handles student results from tests and in the start screen all the students has five circles, on for each test (form). 

I've got six datasources, Sharepoint lists. Five tests and one summery. 

I want to use SubmitForm since it's easier, less editing because there are almost 150 columns total in all the tests. 

 

I got it work with five galleries and a dropdown list to choose test in the start screen. Now I want to make it more user friendly.

 

Any ideas in this matter? 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: From one gallery to multiple forms (different datasources)

Hello @OlaH

You should be able to extract the studentId from the Gallery from the first screen and pass it to another screen that contains a specific form. The form would then extract the specified field from its datasource and bind it to form controls. For example, let's say you have Gallery1 on the first screen which contains a source that has studentId field and then EditForm2, 3 and 4 on other 3 screens. Let's also say you have Button2, Button3 and Button4 that navigate to Scvreen2, 3 and 4 respectively. I asume that all your sources for all the forms also have the studentId field (which would allow to locate a certain student). In this case:

Button2.OnSelect=Navigate(Screen2, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

Button3.OnSelect=Navigate(Screen3, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

Button4.OnSelect=Navigate(Screen4, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

 

EditForm2.Item=LookUp(SourceForForm2, studentId=sId)

EditForm3.Item=LookUp(SourceForForm3, studentId=sId)

EditForm4.Item=LookUp(SourceForForm4, studentId=sId)

 

Hope that helps

2 REPLIES 2
Microsoft Employee

Re: From one gallery to multiple forms (different datasources)

Hello @OlaH

You should be able to extract the studentId from the Gallery from the first screen and pass it to another screen that contains a specific form. The form would then extract the specified field from its datasource and bind it to form controls. For example, let's say you have Gallery1 on the first screen which contains a source that has studentId field and then EditForm2, 3 and 4 on other 3 screens. Let's also say you have Button2, Button3 and Button4 that navigate to Scvreen2, 3 and 4 respectively. I asume that all your sources for all the forms also have the studentId field (which would allow to locate a certain student). In this case:

Button2.OnSelect=Navigate(Screen2, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

Button3.OnSelect=Navigate(Screen3, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

Button4.OnSelect=Navigate(Screen4, ScreenTransition.Cover, {sId: Gallery1.Selected.studentId})

 

EditForm2.Item=LookUp(SourceForForm2, studentId=sId)

EditForm3.Item=LookUp(SourceForForm3, studentId=sId)

EditForm4.Item=LookUp(SourceForForm4, studentId=sId)

 

Hope that helps

OlaH
Level: Powered On

Re: From one gallery to multiple forms (different datasources)

Thanks @dinsc! The lookup function was the key. This will be very useful for me. What a start of a new great year! :-) Ola