Hi all,
I am building a custom page in my model driven app.
I have a custom button on the main ribbon that when pressed opens a custom page and pulls in via a JS parameter the Guid of the items I have selected in the view before pressing the button.
For dev sake my Gallery called is Gallery6. It's items are from a collection called accids.
Accids collection is populated like via the application start menu:
Set(recordIds,Param("recordId"));
ClearCollect(colSplittedIds,Split(recordIds,","));
ClearCollect(accids,Filter('ECOS Traces','ECOS Traces' in colSplittedIds))
On the rest of my page I have two controls one hooked up to a choices menu called Subsidary - control name called cmb_subsidary
I also have a description text box called txt_description.
Now on my custom page the user selects a value from cmb_subsidary and enters text in the txt_description control.
I then need to patch them values to my ECOS Traces table using the GUID's listed in Gallery6
There is a text lbl in Gallery6 that holds the GUID values of the selected records it's called txt.ID
So I was thinking of something like this on a button:
Patch('ECOS Traces',ForAll(
Gallery6.AllItems,
{
Description: txt_description,
Subsidary: cmb_subsidary.Selected.Value
}
));
Navigate('ECOS Traces (Views)'.'Active ECOS Traces')
The values are not being patched. I think I am missing This Record or something or using a filter using the txt.ID field in the gallery?
Any suggestions, appreciated.