Hi!
I am new to Outsystems and trying to make a mobile app with a culture program that can be filtered by day and location (names in Norwegian). I can't seem to get the filter right, and don't know where the problem is. Can someone help? I have attached the oml-file. Thanks in advance!
Hi Camilla, I took a look at your oml. So basically you have to filter by StedId and DagId in the GetKulturprogramsByDagId aggregate. But looking at your Kulturprogram records you haven't defined any Id for StedId and DagId, so they're all with Id = 0. So when you change the dropdown you won't see any result.
Another tip, you had 2 actions to refresh the aggregate on change but you can have only one action and call it on both dropdowns on change envent.
Hope it helped!
Edit: Another note, you need to fetch the aggregates "At start", like Khuong described.
Thanks a lot! But how do I manage to change the id's to other values than 0?
Hi Camilla,
Without having looked at the module (not time currently), can you describe better what you mean by "not getting the filter right"? What are you trying to do, and what goes wrong?
I have three entities. One is the culture-program, that I want to show in the output list on the screen. The two others are day and location, that also are attributes in the culture program entity. I want to filter by day and location and show the filtered program in a list below on the screen. When I try to select day and location in the filters, nothing happens in the output list.
Hope this was clarifying :)
I updated your .oml please take a look.
I added 2 filters into your aggregate.
Regards,
Khuong
Thanks, but it doesn't seem to work when I open browser.
I updated again please take a look.
Need to Fetch GetDags and GetSteds aggregates At start.
Well, right now you can do it manually when viewing the Kulturprogram Entity data like in the image below:
They are all 0 because you are not assigning them when you do the bootstrap from the excel file to fill the Entity. You can use this article as a reference to do that.
It seems like I don't have the dropdown-options to edit the records of the attribute
Do you have service studio's last version installed?
Yes, latest version
Version 11.50.17
Hi @Camilla Berge ,
Please find the attached working OML. Created update KultureProgram screen to update existing records and add values to StedId and DagId.
Also, as per Ricardo comment above you are not having latest version of service studio. Please update your service studio to get the latest features (here its updating table records).
Hope this helps.
Thanks
Hi! Thanks for helping. I get a warning-message when I try to update the records in the browser, see screenshot attached. Also, I have the latest version installed.
I am able to update this record successfully. Did you change anything on code or datamodel? Can you please share OML
Did not change anything in the code, but seems like my environment was not updated to the latest version. Managed to solve the problem by switching to personal environment, since this had the latest update. Thank you so much!
Great, happy coding :)
Figured out that the environment (not using personal environment) wasn't updated. Turns out that by switching to personlig environment, I was able to directly update the records of the entity in Outsystems. Only using one on-change event for the filter also seemed to fix the problem.
Thanks for all help!