On form widget, record is not showing in auto list

On form widget, record is not showing in auto list

  

I dragged one form on my page and one aggregate in my preparation. When I go to fill the source record of form, nothing is showing in the auto list. I need to open control and assign record from the preparation. Why am I not able to see the record here?

Hi Suraj,

I get that behavior when my aggregate is not filtered by the Id of the record. I think that is the reason why you don't see it in the auto list.

Cheers,

José

Hi Jose,

I don't understand this behavior that since my aggregate is filtered by the Id, I am not able to see record in form.

Form control is designed to fetch a single record and most of the time we use it for the edit operation and we are passing Id as input parameter and getting the record. So if my aggregate is filtered by Id, why should there be problem to show that record in auto list? If this is the bug, outsystems needs to work on this. I need to check other cases as well.

Thanks and Regards,

Suraj Borade

Hi Suraj,

Experimenting a little more, this is what I found:

  • If you filter by Id and do not have a join in it you will get that aggregate in the option list

And I wouldn't say it's a bug. I would say that it's a feature. If you filter by Id and do not do any joins you will get just one record. Thus, SS shows that one record as an option for the source of the form.

Of course it could be even smarter, because this is applied to any join and the "only with" also returns for sure just one record.

Cheers,

José