cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Trouble Accessing Selected Value from Segmented Control in SAP MDK

johannesw1
Newcomer
0 Likes
218

Hello SAP Community,

I’m currently working on a project using the SAP Mobile Development Kit (MDK) and have encountered an issue with accessing the selected value from a Segmented Control. Despite following the documentation and various examples, I can’t seem to retrieve the value correctly.

johannesSAP_0-1722328575016.png

 


// Function to update counters based on selected value
function Update_Frage_02(clientAPI) {
const selectedValue = clientAPI.evaluateTargetPath("#Page:Mobile_Evaluator_Fragen/#Control:FormCell_Segmented_02/#Value");

// Update counters based on the selected value
if (selectedValue === "Tage") {
clientAPI.getClientData().HybridAppCounter += 3;
clientAPI.getClientData().WebAppCounter += 3;
} else if (selectedValue === "Wochen") {
clientAPI.getClientData().HybridAppCounter += 3;
clientAPI.getClientData().WebAppCounter += 3;
} else if (selectedValue === "Monate") {
clientAPI.getClientData().HybridAppCounter += 3;
clientAPI.getClientData().WebAppCounter += 3;
clientAPI.getClientData().NativeAppCounter += 3;
}
}

Accepted Solutions (0)

Answers (0)