Hi all!
I'm taking the web developer online course and I'm trying to do has many exercises as I can. Now I'm just creating new screens and implementing some widgets in order to train more.
I am trying to use radio buttons to filter the order status of an order but it's not working. I've created a local variable, filtered the aggregate in preparation but something is missing.
I'm attaching pictures so it can helps to illustrate my issue.
I'm sure it's a rookie mistake but I would appreciate very much if anyone can help me!
Thanks in advance,
Francisco
Hi Francisco,
I can't see your entire aggregate in the screenprints, but I'm assuming you have both order and orderstatus as sources, being joined as order.status_id = status_id
so I think you're filter looks weird, I don't really understand why you involve Is_Active for filtering on a given status id.
I would expect something like
OrderStatus.Id = ActiveFilter or ActiveFilter = NullIdentifier()
on a completely different note : assuming your order status is a static entity, you should take full advantage of that, for example by never hardcoding the actual id value, but use the notation
Entities.OrderStatus.New
this improves readability and extensibility of your software. See attached example for another way to make it more extensible, instead of adding individual radio buttons I added them as a ListRecords, so if at some point your customer comes up with extra order statusses, your filter will keep working without having to do any changes to it.
Good luck with the learning path,
Dorine
Hello Francisco,
Try this example:
Regards.
Thank you both for your help.
Dorine, I had some small mistakes but now all goes smooth.
I changed the ActiveFilter data type to order status identifier and the filter as you suggested.
Then your .oml example helped a lot because it was missing a refresh server action!
Thanks so much,