How to take care that DataAction2 is called (follow up question)

Hello


Im now finally busy with the last page but I cannot figure out how I can call dataAction2 so I can show the director data of a movie. im talking about the MovieDetails Screen.


Someone some hints ? 


Roelof


Hello Roelof, 

Can't open the module, but by definition, DataActions are called automatically when the Page is initialized (in mobile and reactuve web applications). 

https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Actions_in_Mobile_Apps#Data_Actions

The output can be used as if it was from an aggregate, and you have evebts like OnAfterFetch. 

Thanks, 


I see output but not what I expected 


back to the drawing board then 


I have this json :


 ],
  "crew": [
    {
      "credit_id": "52fe420dc3a36847f8000437",
      "department": "Directing",
      "gender": 2,
      "id": 1,
      "job": "Director",
      "name": "George Lucas",
      "profile_path": "/8qxin8urtFE0NqaZNFWOuV537bH.jpg"
    },
    {
      "credit_id": "52fe420dc3a36847f800045b",
      "department": "Production",
      "gender": 2,
      "id": 1,
      "job": "Executive Producer",
      "name": "George Lucas",
      "profile_path": "/8qxin8urtFE0NqaZNFWOuV537bH.jpg"
    },



and used this to find the director :

SyntaxEditor Code Snippet

GetCredits.Response.Crew.Current.Job = "Director"


but that does not give me back the right object. 

So some thinking to do how I better can filll the director variable on the data action2. 

Solution

Hi Roelof,

If I undertood, you want to filter the item with Job = "Director", so you can use the Action ListFilter.

Drag and Drop a Run Server Action and choose ListFilter.


The Current will show only one register of your list. The First one or the Last one, for example.


Best Regards,

Leandro.

Solution

Thanks, 


I wanted to make my own version of the idbm challenge as we had to make in the tradional web app. 

Tomorrow I will place my try here so people can feedback so I can learn from it. 

I have made a reactive website of it. I have so far ready , someone can see what I mean.

yoiu can see it here : https://roelof-wobben5.outsystemscloud.com/FilmDatabase/HomeScreen?_ts=637087621050745476


Roelof