Links and insert problems of list | Jon (LabKey DevOps) | 2015-04-07 13:43 |
Status: Closed | ||
Hi FeiFei, So to answer your two questions: 1. If you have a wiki page that is going to be used in lieu of the normal default Insert New page for your list, you will have to update the XML Metadata of that list to redirect your Insert New button to your wiki form. Now, it should be using <insertUrl> as described here: https://www.labkey.org/wiki/home/Documentation/page.view?name=tableMetadata However, I'm currently seeing an issue with using that XML tag, so as an alternative solution, I would recommend you use the buttonBarOptions instead to create an Insert New button that will point to your wiki form. See the example code below where I created a list called "TestList" in my own system. My Insert New button in this case points to the website Google, but you would replace the Target with your wiki page URL instead. <tables xmlns="http://labkey.org/data/xml"> <table tableName="TestList" tableDbType="NOT_IN_DB"> <columns></columns> <buttonBarOptions includeStandardButtons="true"> <item text="Insert New"> <target>http://www.google.com</target> </item> </buttonBarOptions> </table> </tables> Alternatively, if your list is being embedded in a wiki page as a QueryWebPart via JavaScript, another solution would be to use the config.insertURL option in your API call and use that to dictate your Insert New button. https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.QueryWebPart.html 2. And you are correct. Within your wiki page that you've turned into a submission form, you will have to use the the LABKEY.Query.insertRows() API call to insert the rows to update your list. https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Query.html#.insertRows Regards, Jon |
||