How to set select data source

let marks = [
{ subject: “English”, mark: 45 },
{ subject: “Maths”, mark: 36 }
{ subject: “Science”, mark: 42 }
];

How to set the above as data source and show the mark while selecting the subject

You need to use client/server scripts to apply the logic.

Please explain the scenario in full detail and include the concept whenever you create a thread.

The student mark details need to fetch from database for selected student, when user select the subject need to show each subject mark. no need to call server function each time while selecting the subject. All the required data can be read in advance and ready to show in UI as required.

i think, a script is required. so please check the video of fetch from.

I think a bit more context is required to help out here.

Assuming you only want to use a client script, then you would probably want to make use of the Document API (part of the client side api). And then trigger your requirements as you’ve mentioned below.

You are correct, all the required data is available in client side, based on selected subject need to show the mark in UI. Share any refer documentation if available.