Hi
I have a GalleryDetails with text input controls for creating new records.
- When I enter a few records in this gallery, I click the save button and this data gets saved into a collection
- Then I click another save button to write it to the Common Data Service with the patch function.
This works great for creating new records but now I want to edit those records in that same GalleryDetails based on a record that I select in another Gallery thats named GalleryMaster
So I've created an edit button with this code to:
- get the records back from the Common Data Service Entity "CDSDetails"
- put those records in the CollectionDetails
- And show them in my GalleryDetails so I can edit them
This is the edit button OnSelect to create the above magic:
Collect(
CollectionDetails;
Filter(
CDSDetails;
MasterID = GalleryMaster.Selected.ID
)
)
But unfortunately this formula doesn't work. I admit I don't yet fully understand collections. Maybe the formula is correct but "MasterID" isn't. This field is a lookupfield as it represents a relationship between CDSMaster and CDSDetails in the common data service and for some reason it's dotted in blue as a warning for delegation, but even then it just doesn't work as I'm below 500 records at this moment and the button doesn't work at all...
If I change MasterID to ID the formula works but the information that is shown in the GalleryDetails is not correct at all as it shows a blank gallery...
Any help is much appreciated!