Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Paul de Quant 403 posts 1520 karma points
    Jun 08, 2016 @ 07:58
    Paul de Quant
    0

    Adding an update step for a joined table

    Hello,

    I've just setup UI-O-Matic and it all seems to work well. One thing I'm trying to do is incorporate a link table.

    I have a master table of news articles, of which I have another table that contains a list of assets associated with the articles - linked via a foreign key.

    How would I go about creating an edit step as part of the main news article update to modify these entries.

    I know I could probably create a separate instance of UI-O-Matic just for this assets table, but it seems like a long winded way of doing it.

    I hope this makes sense.

    Thanks

    Paul

  • Comment author was deleted

    Jun 08, 2016 @ 08:08

    Yeah currently the only way would be to also have a poco for that table... we could of course look into adding a way, mind sharing some wireframes of how you think it should work?

  • Paul de Quant 403 posts 1520 karma points
    Jun 08, 2016 @ 08:30
    Paul de Quant
    0

    Hi Tim,

    Thanks for getting back to me so quickly. I suppose it depends on the content of the table really.

    I suppose we want to trigger the CRUD operation for that table from within the master record we're updating.

    The only steps I can think of is:-

    1. Creating a separate ApiController, which would return all records in the link table that match the Id of the record your editing.
    2. Then we'd need a custom view to return those and display them the fields to the user - this collection of fields would need add / remove functionality (a bit like the related links property)
    3. We then need an additional save operation in the controller, to save the master record first and then the link table data.

    I hope this makes sense.

    Thanks

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft