Hello everyone,
I´m currently working on the following project but haven´t been able to figure it out so I´m hoping somebody can help.
I have a SharePoint list custom form connected to a Main list (NC), one of the app´s screens have a gallery that, in turn, is pulling data out of a secondary list called "Acciones" (Actions in English).
The same screen allows to create records (+) and store them on the above mentioned secondary list so that when the user clicks on "Details" from the gallery, it should show the appropiate record. The gallery works fine but the issue is when attempting to display the correct item after clicking on "details".
The list´s colums look as follows:
Main List (NC):
| Code (Primary) | Description | Class | Status |
Secondary list (Acciones/Actions):
| Action # | Details | Origen (Code) | Owner |
The "items" propery of the Gallery is using:
Filter(Acciones,DataCardValue_Cod.Text=Origen)
On the Formscreen for the "Details" form I´m using:
LookUp(Acciones,'Asignación #'=GalleryListAcciones.Selected.'Asignacion#'.Text)
Where:
- Acciones: Name of secondary list
- Action #: Column name from the secondary list
- Action# (no spaces): Name of the corresponding label on the gallery
The problem I have is that even though I´m able to create and store records on the secondary list just fine, if there are 2 records with the same "Action #" the app is showing only the first one not considering the Code, so if for example I have the following data stored:
Main List (NC):
| Code (Primary) | Description | Class | Status |
| 001-2024 | Test 1 | Test 1 | Opened |
| 002-2024 | Test 2 | Test 2 | Closed |
Secondary list (Acciones/Actions):
| Action # | Details | Origen (Code) | Owner |
| 1 | Action 1 | 001-2024 | Me |
| 2 | Action 2 | 001-2024 | Boss |
| 1 | Action 2 | 002-2024 | Me |
In this case if I´m viewing the NC: 002-2024 and clic on details for Action #1 is pulling the data for Action 1 but NC 001-2024 (the first on the secondary list) where it should take me to the first action but of 002-2024.
I also tried with filter:
Filter(Prorrogas As _Prorrogas,
LookUp(Acciones,'Action #'=GalleryListAcciones.Selected.'Action#'.Text) && LookUp(Acciones,'Origen'=GalleryListAcciones.Selected.'Origen'.Text))
)
But to no avail. I´ve even attempted fixing it using collections:
LookUp(colAcciones,GalleryListAcciones.Selected.'Action#'.Text='Action #')
But if I do, the details form gets stuck on "Obtaining data". 😞
I hope this makes sense to you.
Thanks in advance for your help.