- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 04:44 AM - edited ‎12-05-2023 04:46 AM
I will try my best for explaining my problem.
So my task is to implement a UI Macro that opens a new tab.
The tab will open the list with a filter on it of the current form where the macro has been placed.
My problem is that i wanna implement it for many fields, so for example
You have Field1 and next to Field1 is the ui macro, if u press the ui macro it should open the new list with filter1
If you press the UI Macro next to Field2 it should open the new list with filter2 and so on with Field3
So basicly i dont want to create for each field a UI Macro, i just want to parse parameters so the script in the ui action can evaluate wich filter should be set for the list.
Is this possible or do i need to create for each field a UI Macro?
for more kontext i will provide my current code but please dont hate me its my first time with ui macros and i tried some things.
(By the way i learned that i can attach the UI Macros on the fields in the Dictonary in Attributes. It would have been so much easier if you just could parse there the parameter)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 03:20 PM
As the UI Macro is evaluated it will have in its context variable ref which will be the name of the field.
So instead of ${field} you would write ${ref}.
If you want to "hack it" just look in sys_dictionary for records where field Attributes contains text ref_contributions, which will have a value after it which will be the name of a UI Macro.
Studying those UI Macros will reveal way more about how field decorators should be implemented; at least as far as Core UI goes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2023 03:20 PM
As the UI Macro is evaluated it will have in its context variable ref which will be the name of the field.
So instead of ${field} you would write ${ref}.
If you want to "hack it" just look in sys_dictionary for records where field Attributes contains text ref_contributions, which will have a value after it which will be the name of a UI Macro.
Studying those UI Macros will reveal way more about how field decorators should be implemented; at least as far as Core UI goes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2023 12:48 AM
thanks i will try it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2023 02:02 AM
You're welcome.
Thanks for marking the solution.