I have problem with add new custom field to search in blocklayered Prestashop.
How I can add new search field with custom type such as:
add textbox to search product by name
add textbox to search product by producer
add textbox to search product by quality
I tried to add custom field but it did not work.
in this case it's necessary to rebuild search functions located in Search.php class (classes/Search.php)
it's necessary to include these fields to search queries.
Related
As a reviewer, I've to add an empty REVIEW column in a DOORS module. Actually I can add columns easily but they're associated to other attributes and there is no "emtpty" option to choose.
Thanks in advance!
I'm sure you want to add content to the column as a result of your review, like "OK" or "not OK".
Content is stored in attributes. So, you first have to add a new attribute on object level to the module with the desired data type (like predefined values, boolean, string or text), and then add a column to your review view which shows the new attribute.
I have to add a particular field in a view in my IBM Domino Designer, but I do not find it.
There are part of my forms :
https://i.stack.imgur.com/OdGf6.png
So I want to show a column with the field "Procédure", i went in my view but "Procédure" don't show up.
https://i.stack.imgur.com/EOAAf.png
As you can see, "NUM_RG" show up but "Procédure" don't.
How I can add a column with "Procédure" field ?
PS : I do not make the forms or anything else in this document.
Thank you.
Are you sure that Acute accent is allowed in field names?
Test switching to formula and write procédure there
Otherwise:
Try renaming the field to procedure instead of procédure if possible and see if it is in listing
Procédure is a valid name, but it is a rich text field and Rich Text fields cannot be used in a view column. You can add a computed text field to the form with a formula using #Abstract(...) if you want to show part of the contents of the field Procédure.
I have a autocomplete field:
I need to set the default value selected for this dropdown using another control value as shown in:
This control is passed to the form load as shown in:
For example if use cost center is 110 as shown in:
Then the default selected value of the Site lookup dropdown needs to be as shown in:
The tricky part is that your Site-Item field isn't a dropdown but an autocomplete. An autocomplete doesn't know all the possible label/values, but can only find some label/values doing a search by label. So you can't tell an autocomplete "set your value to 110", because it doesn't know what the label corresponding to 110 is.
If you knew the label, you could do this programmatically with an fr-set-label, but here you don't have the label but the value. You can read more about this in the section Setting by value. So, my advice is to use a Dynamic Data Dropdown instead of an Autocomplete field.
Goal:
To create a database with documentation about drivers. The idea is to create both vendor and protocol entries, and to link them, as follows: Inside the protocol creation form, I would like to select which vendor supports this protocol.
Approach:
I used the Create your own! button to create the following 2 Applications:
Vendors
Protocols
Inside the protocol creation page I've put a Database List field. With the following properties:
Name = vendors
Display type = select
Multiple select = false
hibernate query : I left this field blank.
xwiki class name = VendorsCode.VendorsClass
ID field name = doc.name
value field name : I left this field blank.
Problem:
To my surprise this works, but not entirely. When I open the form to add a protocol, in the vendor dropdown list there are now not only vendors but also a couple of other objects such as : "Blog.BlogIntroduction". Obviously I don't want that in the list. Why is it in there, and how can I get it out ?
I tried to add the value doc.name in the value field name box as well. But that actually only makes it worse. Now the list only contains "Blog.BlogIntroduction".
Notice that this is a clean fresh installation of xwiki. There's nothing special in this database.
What is going on here?
What you see is the default value for the select item in the Database List, as it is stored in the template page for "Protocol" objects.
A new Database List is initialized to show a list of blog posts, by having a default value of Blog.BlogPostClass for the "XWiki Class Name". (You can try this by creating a new Database List field in step 2 and open the edit view that field; just delete it after you are done.) For a fresh installed wiki there are two blog posts: the "blog page template" in Blog.BlogPageTemplate and the blog intro post in Blog.BlogIntroduction. Exactly these two items are shown initially.
After you fill in the value of your class in the "XWiki Class name" field, XWiki has a chance to find the actual list of possible values.
However it keeps the selected "default value" from the first attempt around (even though it makes no sense).
This looks like a bug to me, at least from a user experience.
How to fix it
First Step: The reason why your list only contains the bogus "default value" might be that the class you have given does not exist.
From what I see in the screenshot the class name looks ok for me, but then this field is not tolerant to any kind of typos, even something like a space before the class name. If the name does not fit exactly, it gives a (nearly) empty list.
If you cannot get it working with the class name and want to go the HQL route instead, use for the HQL field
, BaseObject as obj where doc.fullName = obj.name
and obj.className = 'VendorCode.VendorClass'
and doc.fullName != 'VendorCode.VendorTemplate'
and doc.fullName both as id and value field. This has the additional benefit that the template vendor is not available in the drop down, only the "real" objects.
After you managed to fix the name of the class, you should see a list of all vendor objects (including the VendorCode.VendorTemplate, unless you went the HQL route), and the remaining bogus default value. Now you can continue to the next step:
Second Step: if you managed to fix the class name, you will see your vendors in the drop down beside the default value; now it is time to get rid of the bogus default value. For this go to the template object of the application; e.g.
follow the "Edit Application" link on the start page of the "Protocol" application
then look at the box with the three checkboxes below the field definitions; the uppermost of the checkboxes says "Update class template"
this part contains a link to something called "ProtocolTemplate".
click the link and you end up at the template page
on the template page, click on edit and choose some other value from the drop down of vendors, and then click save.
The "BlogSomething" value should be gone now from the selection of vendors.
Optional step (not answering the quesion, but might be of interest anyway)
If you prefer to have no value at all preselected in the template, you need a few more steps:
in the application edit, edit the field and choose "multiple select" and display type "checkbox"
go to "next step" in the editor, then back to field edit with "previous step"
uncheck the checkbox beside the selected vendor entry, then open the field editor and set "display type" back to checkbox and unset the "multiple select" checkbox.
go the "next step" and "finish"
Afterwards if you create a new "protocol" entry, this is has an empty "vendor" preselected.
I have a picture library and I want to lookup to the name of picture in another generic list. I've tried:
lookupField.LookupField = "Name";
Then when I create a new item of this generic list, the picture lookup column show the list name of picture correctly, but after saving item this column is changed to blank.
Am I doing anything wrong here? Do I have to use other internal field name instead of "Name"?
Pleaze help...
OK, I found another solution. because I can not lookup to default name of picture library, so I create a hidden text field for picture library. This hidden field will get value of name in ItemUpdated event (no need ItemAdded because when I upload a new pic, it also called ItemUpdated <-- don't know why...)
public override void ItemUpdated(SPItemEventProperties properties) {
properties.ListItem["HiddenImageName"] = properties.ListItem["Name"].ToString();
properties.ListItem.Update();
}
Generic list will look up to this hidden field instead of default name field of Picture library