Save the Ids

Hi guys,

Actually I am having 3 entities Class(Static),Student,Student_class.

And my checkboxes is bind with Class Static entity.

I want to save the StudentId and ClassId into Student_class entity.

How to achive this approch.

Please guide me.Attachec .oml

Send the updated .oml  

Application is an mobile web.

Checkbox_UI.oml

mvp_badge
MVP
Solution

Hi Rohan,

I am assuming that the objective of the screen is to add Student records. Therefore, for the given objective, I would suggest you consider the following code changes.

  • Instead of referring to the Aggregate record as a form source record, create a local Student Record variable to hold the form input values.
  • Define a wrapper server action to Create the Student record and followed with inserting all the classes associated with that student in the Student_class entity
  • In the Class selection list, map the checkbox variable property to an Adhoc boolean attribute value defined in the GetClasses screen aggregate.
  • Based on the business case, set the form input filed as a mandatory field.

Refer to the attached .oml file.


I hope this helps you!


Kind regards,

Benjith Sam

Checkbox_UI.oml

Hi @Rohan Roy ,


I've updated the oml to retrieve the StudentId and ClassId.

The highlighted below are the ones I added:

In_StudentId input parameter - I assume this is a detail screen so there's a need for an input parameter to identify what details is going to be displayed.

Checkbox1OnChange Screen Action - this action will trigger every time the checkbox value change. Inside this flow, you will update a certain table base on your requirements.

        - StudentId Screen Action Input parameter - identifies what student record to update. 

        - ClassId Screen Action Input parameter - identifies the class to be saved/update/used.  


Inside the Checkbox1OnChange, you can run your server action (or any other actions) as needed. :)


Hope this helps

Regards,

Marco

Checkbox_UI.oml

mvp_badge
MVP
Solution

Hi Rohan,

I am assuming that the objective of the screen is to add Student records. Therefore, for the given objective, I would suggest you consider the following code changes.

  • Instead of referring to the Aggregate record as a form source record, create a local Student Record variable to hold the form input values.
  • Define a wrapper server action to Create the Student record and followed with inserting all the classes associated with that student in the Student_class entity
  • In the Class selection list, map the checkbox variable property to an Adhoc boolean attribute value defined in the GetClasses screen aggregate.
  • Based on the business case, set the form input filed as a mandatory field.

Refer to the attached .oml file.


I hope this helps you!


Kind regards,

Benjith Sam

Checkbox_UI.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.