Here's the situation:
The app allows to read/write Table_A and Table_B (boh coming from excel). For each of these tables, the app contains a screen named Table_ADetailScreen and Table_BDetailScreen respectively. Inside of these screens is a viewForm displaying informations about a chosen element from Table_A or Table_B (name, age... for Table A; car, location... for Table_B). Now the app also contains a third table Table_C consisting of a single element from both tables in order to link them (name, location). My goal is to implement 2 buttons inside the Table_CDetailScreen named "more details on Table_A" and "more details on TAble_B", both of which would navigate to the detail screen of the concerned element in Table_A or Table_B.
I think that to do so, I would need to get the specified field in Table_C and do a lookup of Table_A/B to match word, but I'm at a loss as to how to do so. (If someone has a simplier solution also then I'll take it gladly).
Thanks for reading through !
Solved! Go to Solution.
Hi @Anonymous ,
You will need to add 2 new display forms to show the Table_A/B's matched record. You cannot make a display form to both show the item you selected from a gallery and the matched record you select from another gallery.
If you can accept this, then your requirement can be achieved by following below steps:
For button1, set below formula in OnSelect property:
Navigate(ScreenA,None)
Add a new screen named "ScreenA" and insert a display form, set below formulas for it:
DisplayForm1.DataSource=Table_A DisplayForm1.Item=Lookup(Table_A,Name=DataCardValue1.Text)
DataCardValue1 is the label control's name that store the Name column in Table_CDetailForm in Table_CDetailScreen (I assume that this screen has the display form of Table_C).
For button2, repeat the above steps and change the data source name and control's name.
Regards,
Mona
@Anonymous
So, the first question is, do you already have the logic in mind to determine which screen you are going to? In other words, if the user clicks on something, you know to take them to Table_ADetailScreen or Table_BDetailScreen, or is this what you are having issues with?
Once you are in either details screen, the part you need to put a formula in will be the Item property of the ViewForm. That will simply be about doing a Lookup(whicheverTable, Location=whateverLocationSelected && name=whateverNameSelected)
Now the next question is, are users going to be selecting this from a Gallery of items or what is the way that a user selects something?
Hello @RandyHayes ,
I'm having issues with actually taking them to the detail screen. I don't know what formula to put in the "OnSelect" property.
As for the selection process, there's a screen named ListOfTableAItems that is a GalleryView, user selects one item from this galleryView and the selection takes you to the Table_CDetailScreen, inside which you can click on the 2 buttons that I want to implement.
Hi @Anonymous ,
You will need to add 2 new display forms to show the Table_A/B's matched record. You cannot make a display form to both show the item you selected from a gallery and the matched record you select from another gallery.
If you can accept this, then your requirement can be achieved by following below steps:
For button1, set below formula in OnSelect property:
Navigate(ScreenA,None)
Add a new screen named "ScreenA" and insert a display form, set below formulas for it:
DisplayForm1.DataSource=Table_A DisplayForm1.Item=Lookup(Table_A,Name=DataCardValue1.Text)
DataCardValue1 is the label control's name that store the Name column in Table_CDetailForm in Table_CDetailScreen (I assume that this screen has the display form of Table_C).
For button2, repeat the above steps and change the data source name and control's name.
Regards,
Mona
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |