Is there a way to make a utility function that returns a sub-row from the main row
Does anyone know if there's a way to achieve this in zoho?
I've got two subforms on my main form, and the second one has a dropdown that's populated with a list of unique id's from the first. A common task that I have is that I need to get information from the related row, so I thought that as I need to do this a lot, I'd make a function to do it for me. But I can't get it to work. I've tried returning a collection, but that fails, I can't find a way to cast an object to a specific type. And this needs to work on new records, i.e. the submit button hasn't been pressed yet.
- PrintPublication Utility.GetPublicationRow(PrintBooking Booking, string pubid)
- {
- c = null;
- for each p in Booking.Publications
- {
- if(p.PublicationID == toLong(pubid))
- {
- c=p;
- }
- }
- return c;
- }