Look Ahead - Add item if doesnt exist - Printable Version +- TACTIC Open Source (http://forum.southpawtech.com) +-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3) +--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4) +--- Thread: Look Ahead - Add item if doesnt exist (/showthread.php?tid=191) |
Look Ahead - Add item if doesnt exist - dankitchen - 01-12-2021 I am trying to see if I can get the LookAheadTextInputWdg to work as a look ahead on the name column of a simple look up table then if the user does not select someting, insert the text they typed in as a new entry in the lookup table. I somewhat have this working as I noticed that using spt.api.get_input_values returns the list of options/results as name/value pairs. Its seems that what the user types ends up being the last two items in the array. If the second last item is empty, it indicates that there wasnt a result and I should create a new entry in the LUT. I guess the question is if there is a simpler\built-in way to do this? I have an example below of my element and the test code I put together to see if it could work. Code: <div class="test_top" style="width:400px; height:400px"> And the save button behavior Code: var server = TacticServerStub.get(); |