I'm trying to create custom options through magmi.
This is what I'm using
Choose your Size:field:1:0
0.00:fixed:size:0`
When I use this it creates a custom option but without a Title name and no SKU image below.
When I try this
Choose your Size:field:1:0
:0.00:fixed:size:0
the use of " : "before the 0.00 then it creates the following
In this case everything is correct except that its missing the price of "0.00"
This is how it should be created as below.
I found the solution.
use a double " :: " before 0.00 as follows.
Choose your Size:field:1:0
::0.00:size:size:0
Related
I need to contact the name and surname in my Ionic 4 Full Starter kit template:
<app-text-shell [data]="customer?.surname + customer?.name"></app-text-shell>
Unfortunately there is not the space between them; how Can I do? If I create a function in customer link getNameAndSurname() there is a message error.
Simply Pass this way
<app-text-shell [data]="customer?.surname +" "+ customer?.name"></app-text-shell>
add space
+" "+
or
customer = { surname: "weerasinghe", name: "chanaka" };
.html
<app-text-shell [data]="customer"></app-text-shell>
Access data
this.data.surname
The above answer did work for me in Ionic 4 with little enhancement. Replacing "" with '' inside the data property.
<app-text-shell [data]="details?.min_salary+' '+details?.min_salary"></app-text-shell>
When 'customer' is defined but contains only empty properties, then this will end up showing 'undefined undefined', instead of the app shell (at least for me), because that added space does make it non-empty.
So my solution is instead of this:
<app-text-shell [data]="details?.min_salary+' '+details?.min_salary"></app-text-shell>
Use this:
<app-text-shell [data]="details.min_salary? details.min_salary+' '+details.min_salary : ''"></app-text-shell>
I have a file with two sheets:
sheet_A
A B
1 Mr. Joe USD
sheet_B
A B
1 =sheet_A.A1 ???
sheet_B.B1 shall show the value USD. I know i could get it easily with =sheet_A.B1 but I do not want that.
If I enter into sheet_B.B1 =ADDRESS(ROW();COLUMN()-1) I get the output $C$1 and with =INDIRECT(ADDRESS(ROW();COLUMN()-1)) Mr. Joe.
How can I "navigate" through a chain sheet_B.B1 - sheet_B.A1 - sheet_A.A1 - sheet_A.B1?
Edit 1
Maybe I need something like this
=OFFSET(FORMULA(ADDRESS(ROW();COLUMN()-1);0;1)#
sheet_B.B2 shall show the content of sheet_A.B2 in relation of the value in sheet_B.A1
Here are two possibilities. Either formula produces USD in sheet_B.B1.
=INDIRECT(ADDRESS(ROW();COLUMN();;;"sheet_A"))
=VLOOKUP(A1;$sheet_A.A1:B1;2)
Documentation: ADDRESS, VLOOKUP.
EDIT:
One more idea: The following produces the string "=sheet_A.A1", which could be parsed for the sheet name and cell address. Perhaps you would like to use it to refer to sheet_A.B1.
=FORMULA(INDIRECT(ADDRESS(ROW();COLUMN()-1)))
However, as I commented, there is probably an easier way for what you are trying to accomplish.
Documentation: FORMULA.
EDIT 2:
Here is the formula you requested. It uses REPLACE to remove = at the beginning of the string.
=OFFSET(INDIRECT(REPLACE(FORMULA(INDIRECT(ADDRESS(ROW();COLUMN()-1)));1;1;""));0;1)
I've been trying to append some more data to an OTRS ticket (newest version). And I have managed to get the information in the ticket data alright, however, I do not know how to access it in the view. Most data seems to be parsed through via $QData/$Data, however, all I get when I print my variable is 16/12.
%CustomerCompanyName = $Self->{CustomerCompanyObject}->CustomerCompanyGet( CustomerID => $Ticket{CustomerID} );
#}
$Ticket{CustomerCompanyName} = \%CustomerCompanyName;
And I want to access it in the dtl AgentDashboardTicketGeneric.dtl, however, $Data{"CustomerCompanyName"} is empty. I've managed to get the hash or 16/12 out. Again, in the variable $Ticket we've managed to dump the variable and see the data is actually in there (without actually being able to access it, we can't figure out which data type it is and have tried all possible ways we could think of).
Edit: I figured it out. It worked with Johannes solution, however, the value of the column in the SysConfig had to be 2, and not 1.
you can access all Ticket Data through the User Interface. In every widget, in the top right corner you can access the settings and remove, add, sort columns.
If you need the Customer Company data, which are not bound to the ticket-data, then you need to modify / extend the given module (Kernel::Output::HTML::DashboardTicketGeneric). Thats the reason why $Data{"CustomerCompanyName"} is empty, because the customer company stuff is not loaded there.
IMHO you don't need to modify the dtl. Add the new column in the sysconfig:
HTTP://OTRSHOST/otrs/index.pl?Action=AdminSysConfig;Subaction=Edit;SysConfigSubGroup=Frontend%3A%3AAgent%3A%3ADashboard;SysConfigGroup=Ticket
Add the new Column "CompanyName" to every widgets DefaultColumns.
(Hint: here you can also add DynamicFields using DynamicField_XXX)
Then modify the Code in DashboardTicketGeneric.pm
First: add the module (around L:21)
use Kernel::System::CustomerCompany;
after that initiate the module (after CustomerUserObject around L: 44)
$Self->{CustomerCompanyObject} = Kernel::System::CustomerCompany->new(%Param);
Then add the logic to the module (around L: 1414 - after the customer name block:
elsif ( $Column eq 'CompanyName' ) {
# get customer company name
my %CompanyData;
if ( $Ticket{CustomerID} ) {
%CompanyData = $Self->{CustomerCompanyObject}->CustomerCompanyGet(
CustomerID => $Ticket{CustomerID},
);
}
$DataValue = $CompanyData{CustomerCompanyName};
}
Then delete the cache (..bin/otrs.DeleteCache.pl), because widgets use caching and your changes won't apply fast enough ;)
Add the column to your widget (top right corner in the widget -> Settings) and you should be fine.
Update: place the "new Module" in the custom folder
Custom/Kernel/Output/HTML/DashboardTicketGeneric.pm
regards
Johannes
I want to format a date parameter in my report. The date looks like this in my database and my report "yyyy-mm-dd" (2014-04-17 for example). I tried to do it with that line of Code which I always saw on other posts:
new SimpleDateFormat("dd/MM/yyyy").format($P{Startdatum})
That doesn't work of course and I am getting this error:
Error filling print... Error evaluating expression :
Source text : new SimpleDateFormat("dd/MM/yyyy").format($P{Startdatum})
net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :
Source text : new SimpleDateFormat("dd/MM/yyyy").format($P{Startdatum})
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:203)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:591)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:559)
at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:966)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:456)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:440)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:455)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:457)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:421)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:282)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Caused by: java.lang.IllegalArgumentException: Cannot format given Object as a Date
at java.text.DateFormat.format(DateFormat.java:301) at java.text.Format.format(Format.java:157) at Berichtsheft_1397742638211_397211.evaluate(Berichtsheft_1397742638211_397211:223)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:190)
... 20 more Print not filled. Try to use an EmptyDataSource...
I am using this parameter for one of my Queries ! Could that be the reason for the error ? Or is the syntax simply false ? Or is there even any other reason for this error ?
Try to use just parameter name like this:-
new SimpleDateFormat("dd/MM/yyyy").format($F{Startdatum})
and check the report "Language" in property panel you should change it to "java".
To change the report language go to Windows --> Report Inspector- and click on the report name and then --> Windows--> Properties.
Here in down the panel you can select the Language.
Try to use that expression instead
new SimpleDateFormat("dd/MM/yyyy").parse($P{Startdatum})
I'm using zend currency to display the currency based on locale. When I use the following code the symbol gets replaced by 1 instead of simply being removed:
$currency = new Zend_Currency($locale);
$currency->setFormat(array('symbol' => Zend_Currency::NO_SYMBOL));
What normally gets returned is this: € 2.500,01
but after the "setFormat" call I'm getting this: 1 2.500,01
I don't want the "1 " in there.
Any ideas on how to fix this?
Thanks.
Here's the ZF tutorial page for this. It looks like it will set a person in the right direction: zend currency tutorial page
You're setting the wrong option in setFormat. You need to set display to Zend_Currency::NO_SYMBOL. Like this:
$c = new Zend_Currency();
$c->setFormat(array('display' => Zend_Currency::NO_SYMBOL));
echo $c->toCurrency(2500.01);
Which outputs
2,500.01
The way you are currently doing it is literally setting the symbol to 1 because that's what the constant NO_SYMBOL evaluates to.