Not sure how many of you have used UiPath, but I am having an issue when scrapping within UiPath and trying to insert that scrapped variable into my database. It keeps telling me it is not the right column name. Any suggestions?
To pass the contents of the variable returned by ScrapeActivity to the query you must first declare a parameter in the "Parameters" property of ExecuteNonQuery activity.
Let's say your ScrapeActivity returns the scraped text in scrapeActivityResult variable.
Click on "Edit Query" and afterwards the "Parameters" button.
A new dialog will open where you can add parameters.
Add a new In parameter named companyName of type "String" and set its value to scrapeActivityResult variable.
After that, you have to use the newly created parameter(companyName) into your query
"INSERT INTO tblCompany('CompanyName') VALUES (#companyName)"
That was happening to me too! There is a parameter in the query activity that needs to be set/not set
It's really good to see uipath stuff here...
Related
I'm not seeing another thread that quite encompasses my scenario: the report I'm modifying has a parameter that I want to make optional, but it is comprised of 3 fields. There is a first name and last name field in which you can start typing, and with the use of a LIKE operator, the actual parameter (Authority) used in the main data pull populates with options that match:
So I've attempted ensuring that the parameters (all 3) have the 'allow blank' and 'allow NULL' checkboxes marked. I've also modified that parameter within the dataset properties to account for NULL:
Lastly, my main query's WHERE clause has the following line: and (data.AuthorityName = #Authority or #Authority is null)
When I declare this variable and set it to NULL, the query does exactly what I want it to, it pulls the data irrespective of what's in this column. But for some reason, I cannot get the report to pull anything. I click View Report and nothing happens. Any ideas?
I had similar question for sub report and was answered:
SSRS passing multiple string parameter to another report
However this time I would like to pass my parameters to a different report instead of a sub report.
For the first report, my ponum parameter consist of string like 'a-01', 'b-02', 'c-44'...
and then perform a query that like
select column_X from table_1 where ponum in (#ponum)
and then user click on a expression link which send the rows to another report to perform another action via a query. such as
update table_1 set column_A = '123' where ponum in (#ponum)
My problem is I can't send the parameter as a multiple values parameter. I added an expression for user to click and added the parameter in this window
I also tried
=join(Parameters!ponum.Value,", ")
="'"+join(Parameters!ponum.Value,"', '")+"'"
In Report_2, I set up the parameter as this
Unfortunately, the report it goes to only receive the first value or the query doesn't work and parameter being the problem.
Would like to hear any idea that might work.
Thanks in advance.
Hello Datastage developers,
I'm pretty new to the tool. I'm trying to develop a parallel job with Oracle stage. I need the database parameters to be populated at run time. I see there are jobs designed for our project which take these parameters(DB name, userID, password, schema) from a file located on the ETL server. I'm unable to find how the job hits that file and gets the values. I hope I've put the question clearly. Can you guide me step by step how to get the parameters from a file?
When a file based parameter set is used, the parameter set picks up the contents of the file at the time the job is started. This provides excellent flexibility as long job could manipulate a parameter set file, and leave new parameters for a subsequent job. The key is that the parameters are not compiled into the job or the parameter set. The following steps detail the creation and use of file based parameter sets.
File > New > Other > Parameter Set
In the general tab name the parameter set.
(Alphanumeric and Underscore characters only. No spaces.)
For example: my_file_parm_set
In the Parameters tab create the parameters and defaults
In the Values tab put the name of the file in the "Value File Name" column.
Specify file name only. No path component
Use alpha numeric characters etc. No spaces.
For example: parm_file.txt
In the same row, list values for each parameter defined in the Parameters tab. The table should look like this:
Click OK and save the the parameter set.
At this point the parameter set file should have been created using the following system:
Projects/ParameterSets//
In our example the file name would be:InformationServer\Server\Projects\foo2\ParameterSets\my_file_parm_set\parm_file.txt
The contents of the file looks like this:
foo=Parm file value for foo
bar=Parm file value for bar
In the job, navigate to Edit > Job Properties and select the Parameters tab.
Click Add Parameter Set and select the newly created parameter set:
=============== Create the Sequence Job ===========================
Create a new sequence and add a Job Activity stage to it. Double click on the stage to edit its properties, and click on the button to select a Job name. Once the job is loaded, its parameters become visible in the Parameters section of the Job Activity screen. The new parameter set should be in the list. Click on the drop down selector in the Value Expression column and select the parameter file:
Click OK and save the sequence.
Now every time the sequence is run, parameters are read from the file at run time and passes to the job. Any preceding jobs in the sequence can change the file to dynamically modify the parameters.
Please help me to set the SSRS Report parameters to be optional i.e Non-Mandatory field in SSRS 2005.
Set the parameter to 'Allow null value' under General section. Null according to SSRS means it does not have to be set, thus making it optional.
Then post something like this in the predicate of your SQL syntax:
Where column = isnull(#Variable, column)
This lets the dataset know that if the variable is set then use it, else have an operator to have the value equal itself. I am certain this works in SSRS 2008 and 2012, not sure of 2005 but I would assume it may be there.
As Hiten suggested there is nothing exactly we can call as optional parameters but if you want users to see this parameter as optional, use formula or case statements.
Parameterized stored procedures with some defaults or null value can be used to achieve the same goal.
Further to djangojazz (dig the name, btw) - If the dataset is based on a SharePoint list (which doesn't support Query parameters, afaik), you can use the following formula in the Value box of the Filters section of the Properties dialog in whichever data region (e.g. Tablix) is invoking the parameter:
=IIf(IsNothing(Parameters!myParam.Value),Fields!myField.Value,Parameters!myParam.Value)
Neither of these answers helped, nevertheless I found the solution here:
Open the report for editing in Visual Studio.
Expand the Parameters node and rename the affected parameter to ParameterName1.
Set AllowBlank and Nullable to True if not already set.
Deploy the report.
Rename the parameter back to ParameterName.
Deploy the report.
After adding a parameter to your report and checking 'Allow Null Value',you can then add a filter to the dataset where the below expression is added to the value field for the filter
=IIf(IsNothing(Parameters!Param.Value),Fields!Field.Value,Parameters!Param.Value)
I have a field in a 2003 access database named first. I run the data adapter update command, gives me "Syntax error in UPDATE statement." I change the field name to firstName, try the update again, it works. I already have a bunch of programs using the database and using the field "first", do I really have to rename my field, go back and update all my programs to read from firstName instead of first? I really don't want to go that route if I don't have to. Any suggestions? Thanks!
(provider=microsoft.jet.oledb.4.0)
*Edit: I meant to specify, I want the answer to use commandbuilder (but it won't work that way). Sorry for any confusion.
Do this with your commandbuilder object:
Dim cmdBuilder As New OleDb.OleDbCommandBuilder(oledbAdapter)
cmdBuilder.QuotePrefix = "["
cmdBuilder.QuoteSuffix = "]"
This will put brackets around all field names. I had the same problem with a field named Index and this resolved it.
Try putting square brackets around the field name, [first].
oledbcommandbuilder breaks when fields are named with the reserved word "first". Had to write my own SQL