Foundset is returned null

I am having form based on a tableA ,to view data. Based on value selected on form, look up for some information. If information is available then data are stored data in another table tableB. To add record in another table I created below Code which throws error message

/**@type{JSFoundset db:/Servernm/tableB}*/
FS=databaseManager.getFoundSet(‘Servernm’,‘tableB’) // FS is returned as null
FS.newRecord(false) //TypeError: Cannot find function newRecord

While debugging code FS is returned as null. Any suggestion.

Code looks fine to me, but you should declare the FS variable in the 2nd line (var FS = databaseManager…) otherwise putting the JSDoc in your code makes no sense.
Are you sure the databasename and tablename are correct?

What Servoy version are we talking here anyway? (maybe a nice thing to add in your signature by default :) )

Thanks Marc.
You are correct.It worked when I added var FS below JSDoc.

I would also like to know regarding foundset. When we load SQL in Foundset and display in form. By defualt it selects 1st record when I say, foundset.getSelectedIndex() by default returns me 1st record in foundset. How Can I check whether no record is selected in form.