Prepopulate dynaform textbox(es) - processmaker

I have a variable from a previous step which I want to use to prepopulate textboxes in a dynaform via an SQL query to an external database. How can I do this? Can anyone provide me with an example XML field ... or do I have to use a trigger?
Thanks

You can find material on this link, when you create the field to populate it with the sql statement choose the connection you made and then write the sql on the box below.
The final xml will be something like>
<MyDropdown type="dropdown" required="0" readonly="0" savelabel="0"
mode="edit" options="Array" sqlconnection="dbarray">
SELECT CONTACT_ID, CONTACT_NAME FROM CONTACTS
<en>Select Contact</en>
</MyDropdown>
Regards.

Related

ServiceNow Rest API (using PowerBI)

I'm on a project in which I need to get data from a ServiceNow instance and treat all data with PowerBI. I'm able to retrieve a big amount of data (Snow collect a lot of data), but I still need a way to filter data correctly. I'm calling to this URL:
Besides, I want also to apply a filter to retrieve just some specific registries from the table Requested Items. For that, I use the sysparm_query parameter to filter the field "cmdb_ci" and more specifically it's "name", something like:
&sysparm_query=cmdb_ci=What I need to Filter
Apart from this, I have also tried:
&sysparm_query=cmdb_ci.value=What I need to Filter
&sysparm_query=cmdb_ci.display_value=What I need to Filter
&sysparm_query=cmdb_ci.sys_id=What I need to Filter
&sysparm_query=cmdb_ci.name=What I need to Filter
But still not found the solution... as all these does not respond the solution needed.
Does someone know how I can manage this?
Thanks!!
JLG
There are two "Configuration item" fields in sc_req_item: cmdb_ci and configuration_item. Make sure that you are using the correct one. Either cmdb_ci.name=value or configuration_item.name=value should work, depending on which of the two fields you are using. cmdb_ci.value and cmdb_ci.display_value will not work as there are no fields on the record with these names. cmdb_ci.sys_id should work if you are supplying a sys_id (although it is redundant to type .sys_id for a reference field).
You should first verify your query through the ServiceNow UI before attempting to use it in an API call.
Type sc_req_item.list in the Filter navigator
On the filter list select "Show related fields"
Get your filter to work correctly
Right-click on the filter and select "Copy query"
The next step is to test it using the REST API Explorer.
Final step is to configure your client tool (PowerBI).

Zapier form dynamic inputFields manipulation

I'd like to manipulate the input fields of a trigger form dynamically:
I have a trigger 'hidden' with a combo-box in a form
Each time I update the combo, it should add one or more combo-boxes in the same form depending on the value
I couldn't find any way to access the operation.inputFields somewhere for doing an update on this list dynamically, whether via the bundle or else...
Here is the small example: https://github.com/nuxeo-sandbox/nuxeo-zapier/blob/spikes-NXP-26085-zapier/nuxeo-zapier-app/triggers/project.js#L8-L16
Thank you for your help!
Vlad
David here, from the Zapier Platform team.
It sounds like you're looking for Custom Fields: https://github.com/zapier/zapier-platform-cli#customdynamic-fields
In addition to a static list of input fields, you can provide a function that will run and provide a dynamic set of fields. It's how we get inputs for each column in a google sheet:
Is that what you're asking? Modifying the inputFields array at runtime probably doesn't do what you want.

Adding fields Dynamically in MongoDB

I am new to MongoDB.
My application is dynamic form builder that lets users add dynamic fields on the form. None of the field on the form is fix or static. The user can add any number and any type of fields such as Textbox, Textarea, Dropdown, Checkbox, Radiobutton etc fields on the form and save the form.
Can Mongo DB be used for such storage and fetching the data ?
How the data to be stored in Mongo DB and fetched to display the form?
I'm using ASP.NET MVC as a frontend
MongoDB as a backend
Hope for the best answer :)
Thank You!!!
In MongoDB, you don't have a predefined schema for your collection, if you decide that only that document will have an name field, you can. The schema is dynamic so you can add any data you want in your case. It's really useful but you have to be careful after when you query your database for undefined value. Hope this will help you.

How to capture the Parameters being sent to a particular Stored Procedure?

In SQL Server 2008R2, do we have a query which can find the parameters being passed to a particular stored procedure?
I found it. Query will be
select PARAMETER_NAME,DATA_TYPE from information_schema.parameters where specific_name = 'StoredProcName'
Sql server doesn't keep the history of query execution. So there is not anyway to know parameters being passed to a particular stored procedure. If you want you can write a script in the procdure itself and keep all values in some tables. Or you can save query profile data in the trace file or in some table etc.

Fastreport and TSQLQuery

I use TSQLQuery (from DBExpress) to run a query on two Mysql Tables. Now i want to print a report from that Query using FastReport but i don't know how to do it!
Help me please.
If you enable the query at runtime (fill in relevant params if need be in the designer), you can doubleclick the TSQLQuery to bring up the field designer.
Choose add all fields.
Now you can add a datasource to that TSQLQuery and link the fields to your FastReport.
I strongly advise you to connect the query to the default SQLConnection at design time, and not at run-time, as you are currently doing (according to your comment). This will enable you to see the fields of the query and so link the correct fields to the FastReport.

Resources