Using DAL Queries in Form Builder

Hello,

does someone know how to use DAL Queries in Form Builder?

Actually I am looking for an example similar as shown in the Documentation, but using Form Builder. I wonder why the Documentation still refers the old forms???

Any input is very appreciable:)

Many thanks in advance und best regards,

Evanela

Tags:

Parents
  • Suggested Answer

    0

    Information about form builder is found in Administrator’s Guide to Form Builder but it is still not complete.

    First you have to setup the query in DAL and deploy it. If it returns some errors when being called later, try flushing the cache on IA.

    On the form builder you have 2 options: DN Query component or query from code. I rarely use the first one.

    The code is as follows. Note that if your query has no parameters, do not pass the last parameter at all. Passing empty braces wont work {}.

    IDVault.globalQuery("IDM", "/rest/access/query/global", "<dal_query_key>", [<list_of_return_attr>], {<json_of_query_parameters>})

    Real example:

    IDVault.globalQuery("IDM", "/rest/access/query/global", "CheckMail", ["CN"], {"mailToCheck": input, "username": currentUserCN})
    .then(result => {
        console.log(result);
    })

    I hope this answers your question.

    Best regards, Nik

Reply
  • Suggested Answer

    0

    Information about form builder is found in Administrator’s Guide to Form Builder but it is still not complete.

    First you have to setup the query in DAL and deploy it. If it returns some errors when being called later, try flushing the cache on IA.

    On the form builder you have 2 options: DN Query component or query from code. I rarely use the first one.

    The code is as follows. Note that if your query has no parameters, do not pass the last parameter at all. Passing empty braces wont work {}.

    IDVault.globalQuery("IDM", "/rest/access/query/global", "<dal_query_key>", [<list_of_return_attr>], {<json_of_query_parameters>})

    Real example:

    IDVault.globalQuery("IDM", "/rest/access/query/global", "CheckMail", ["CN"], {"mailToCheck": input, "username": currentUserCN})
    .then(result => {
        console.log(result);
    })

    I hope this answers your question.

    Best regards, Nik

Children
  • 0 in reply to 

    Hi Nik,

    thanks a lot for your answer. This is very helpful. 

    One more question:

    I was thinking to use the "Select" component of Form Builder and populating it with users from a global query and than be able to search by user name or userId.

    How to configure such component and populate with query data?

    Thanks and best regards,

    Evanela