Skip to Content
0
Jan 20, 2023 at 10:14 AM

MDK - Convert Value of Segemented Control to "true/false" on OData Action

140 Views

HI,

I have a segmented control with 2 values ("Partial" and "Final"). When clicking "Submit" on the page it does a CallFunction OData Action and sends data back to SAP. The CallFunction Action contains two parameters of "Partial" and "Final" which need to be either "true" or "false".

How do I say "if Partial is selected, then set Partial Flag on CallFunction Action to true" (same for Final)?

...{
                            "_Type": "Control.Type.FormCell.SegmentedControl",
                            "_Name": "FormCellSegmentedControl0",
                            "IsEditable": true,
                            "IsVisible": true,
                            "Caption": "Type",
                            "ApportionsSegmentWidthsByContent": false,
                            "Segments": [
                               "Final",
                               "Partial"
                            ]
}...

Action:

..."Function": {
			"Name": "Confirmation",
			"Parameters": {
				"Final": false, <-- I want this to be "if Final is selected, then true"
...

Thanks,

James