I faced some problem with CodeIgniter's active record as it automatically adds accents. For example i need to use this ORDER BY FIELD(sites.ID, 120, 27, 119), so i do it like $this->db->order_by('FIELD(sites.ID, '.implode(', ', $sites).' )');, but getting
ORDER BY FIELD(`sites`.`ID`, `120`, `27`, `119`)
I also tried to add apostrophes, but nothing has changed. Is there any way to do my query or i need to rewrite it as a simple query?
$this->db->where() accepts an optional third parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks.
Active Record documentation
Related
How can I remove or hide the suffix from quotes autonumbering?
It's enough to suffix does't appear in quotes template.
Can anybody help me please?
The Quote Autonumbering is a standard feature of Dynamics CRM and can't be changed to remove a part.
You can always create another field to use as Quote Number and use an alternative Autonumber solution (like this one)
If I remember correctly the quotenumber field of the quote entity can be set to a custom value when the record is created so you can try first to set the autonumber solution to fill the quotenumber field, if doesn't work you need to create a new field.
I create a new field and set field type to calculated with
condition -> If Quote ID contains data
and action -> TrimRight(quotenumber, 5)
and then use it in quote Template .
It's Done .
Thanks Guido for your clue .
I have an excel file with a table named 'Table1' in it. I have to perform 'Filter Table' activity in UiPath with the condition "column1 begins with '*my column'". But when I specify the value like this, the column is filtered for 'ends with' operation.
Here is the screenshot for my table-
Below is the screenshot for the steps I followed-
This has been answered many times on UiPath Forum
For example https://forum.uipath.com/t/filter-table-in-excel-data-tables/559/3
If you use *my value as the search / filter pattern, then it'd mean, anything in the beginning and must have my value in the end. So, it is being interpreted correctly as Ends With. If you want to have a Begins With filter, you should have your filter text followed by the wildcard, like - my value*.
Further, if you want to include wildcard as a literal in the search pattern, you'd need to escape that by enclosing it in brackets like [*]my value* - this'd search for text beginning with *my value.
MS Excel / VBA also supports Tilde ~ as an escape character in some cases.
In excel filters, '' represents any series of characters.
The issue in the above case is that the filter value in the condition already contains a ''. Because of this, system always reads it as '*My column' => '[any characters]My column'. i.e., value ends with 'My column'.
To resolve this issue, I have specified contains filter instead of Begins with as 'My column'.
I have also tried to escape '*'. But it threw excel exception.
In addition, you can not specify condition as "Column1 Like '*My column%'". This works file when you are adding filter to 'DataTable'(after performing 'ReadRange' activity). But in this case, you will retrieve all the records and then you will be filtering the columns. This will lead to performance issues if the the excel table is huge.
You can follow the syntax below to perform filter activities in an excel:
DataTableName.Select("[ColumnName]='Datawithwhichweneedtofilter’").CopytoDataTable()
I am trying to build an url to make the job of going to the SSRS page a bit faster and to eliminate all the input a user has to do (he already did it in an other program.
When I use this url:
http://localhost/ReportServer/Pages/ReportViewer.aspx?/folder/subfolder/reportname&rs:Command=Render&customerId=1000002
I can't fill out the parameter that has query where the default values of the parameters are found in the database, when i remove the query behind the parameter the textbox is filled out and the report is working as expected, i am sure the value of custimerId is in the database
How can I solve this?
I found it.
Data i got back from the database contained some trailing spaces. After removing those it worked like a charm.
Following is the data model of the dashboard I am facing problem in:
http://blob:http://stackoverflow.com/f3e40cfe-e009-4d03-bcf5-b7b4305c18c4
Now, what i want to achieve is that in Case there is a filed named Manufacturing_Date. And in MWODefetcs there is a field named Defect_Date. What i want is that when ever a record is selected from a table containing cases from Case corresponding records are shown in another table based on the exact match of Manufacturing_Date=Defect_Date.
As simple as it sounds, i can not seem to accomplish it. I have tried the following expressions to no avail:
Count({<[Defect_Date_text]=p([Manu_text]),FaultID=,DEFECT_CODE=>}MFG_BARCODE_NUM)
sum({$<Defect_Date ={"=$(Manufacturing_Date__c)"}>}Defect_Date)
Do the 2 tables need to be directly linked. Is it the intermediary iFaults table that is preventing me to accomplish it?
Please help.
you should use the P() set expression like this:
sum({$<Defect_Date =P(Manufacturing_Date__c) >}Defect_Date)
I have to create a birt report with user input parameters. It is something like when the para
meter is left blank it should fetch all values from a table otherwise when the user inputs the students roll no.,the corresponding data should be fetched. Can this be done through Birt report? If yes, then please suggest a way.
Thanks!
Yes, you can do that. If the parameter is optional you can't use the Dataset Parameter (with a ? in your query), because it will be null. Instead you have to modify your query using JavaScript.
Create a Report Parameter like usual, in this case 'stud_no'. Then add a comment in your SQL that you are reasonably sure is unique, I use something like --$stud_no$, wherever you want your clause inserted.
Then add a script like this to your Data Set, in beforeOpen:
if (params["stud_no"].value){
this.queryText = this.queryText.replace("--$stud_no$", "and stud_no = " + params["stud_no"]);
}
This replaces the comment with the clause when the parameter has a value. You can use regex in the search string, and then you can also insert it multiple places if you want.
Create your paremater using a like statement
where students_roll_no like ?
Create your report paramater using as a text box, with a defualt value of %
Because the percent '%' is the SQL wildcard, it returns all values. If the user enters a Student Roll number, it returns only that record. Additionally the user can enter 0500% and get all the records that begin 0500.