How to make related records required for grid?

Posted by matman on 02-Jan-2015 04:17

I have replaced my lookup field with a grid, but now I can't find a way to make an entry required. I added a validation trigger to return the ID of the first grid record. This always returns a -1:

I want to keep my validation server side, is there any way I can accomplish this?

Posted by Gian Torralba on 12-Jan-2015 08:30

Thank you. Let's just wait for it to be approved and be included in the next release of Rollbase. I believe this functionality is important as well since we are doing workarounds just to make a grid item required.

All Replies

Posted by Gian Torralba on 02-Jan-2015 06:46

Hello,

You can add a validation trigger on the parent record that will check if it has any child records created. You can use the rbv_api.selectNumber() inside the "Validate Record Data" trigger type. Please use the "on finalize" trigger timing so it will run after the creation of the grid items.

Thank you,
Gian

Posted by matman on 02-Jan-2015 07:21

Hi Gian, thank you for your reply. I cannot select "On finalize" as my trigger timing on the validation trigger. Do you happen to know another way I could do this?

Posted by Gian Torralba on 06-Jan-2015 09:49

Hello,

Unfortunately, you cannot require a grid record without doing some javascript customization since there is no configurable way as of now to check if a record is created for the parent item. However, you can post this in the Ideas section by clicking this link. https://community.progress.com/community_groups/products_enhancements/i/rollbase/default.aspx

Regards,
Gian

Posted by matman on 06-Jan-2015 10:06
Posted by Gian Torralba on 12-Jan-2015 08:30

Thank you. Let's just wait for it to be approved and be included in the next release of Rollbase. I believe this functionality is important as well since we are doing workarounds just to make a grid item required.

This thread is closed