This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Searching for User Parameters
#1
Hi All,

I'm trying to find a user parameter via a keywork (tag) search rather than the parameter name much like I can do it with other types.  I've looked at running a sql query in a function to do it however I can't seem to associate a keyword with the parameter name.

I can use: 

SetUserParam('Local Network', 'w_obs_wind_dirtext', value) 

however I want to set the value based on the keywork like

SetCBusByKW({'irrigation_current_runtype'}, 'or', {target = 1, ramprate = 0})


I have some db helper functions like the below, so not opposed to doing something in a query.


function db_GetObjectByTag(tag)

    -- Return a table of object parameters based on the id
    local query = string.format('SELECT * FROM objecttags WHERE tag = "%s"', tag)
    liste = db:getall(query)

    if (table.maxn(liste) ~= 0) then
        return liste
    else
        return false
    end
   
end





Cheers,
Paul
Reply


Messages In This Thread
Searching for User Parameters - by pspeirs - 12.02.2020, 12:51
RE: Searching for User Parameters - by Daniel - 12.02.2020, 13:20
RE: Searching for User Parameters - by admin - 13.02.2020, 08:39
RE: Searching for User Parameters - by Daniel - 13.02.2020, 08:43
RE: Searching for User Parameters - by Daniel - 13.02.2020, 10:31
RE: Searching for User Parameters - by admin - 14.02.2020, 07:33

Forum Jump: