I have two lists: [Parents] [Children]. The Children list has a one-to-one lookup column to the Parents list. When deploying the Children List I have data written into the tag using
<Data>
<Rows>
<Row>
<Field Name="ChildName">Stephanie</Field>
<Field Name="ParentNameLookup">What value goes here?</Field>
</Row>
</Rows>
</Data>
My question: is there a way to populate the data into the tag for the ParentNameLookup field?
Try this
<Field Name="ParentNameLookup">ID;#VALUE</Field>
Where ID is ID of the Parent List Item and VALUE Represents actual Text.
Related
Let's say, I have a custom form in frontView, with "txtroles" multi-select HTML element.
I submit it to my "UpdateProjectUsersAction" and would like to save it to my "project_user_roles" which have project_id (foreign id), role_name (text), userid (foreign id).
Now, I would like "UpdateProjectUsersAction" to save each multiple values added in "txtroles" to each new rows in my "project_user_roles" table
How to Add new field in Sales Order lines Tab in Odoo 13?
My Goal is to add new field/column before Product column in Sales Order Line tab.
res_sale_order_line.py
class ResSaleOrderLine(models.Model):
_inherit = "sale.order.line"
new_field = fields.Many2one('product.product', string='New Field')
views.xml
<xpath expr="//page[#name='order_lines']/field[#name='order_line']/form/group/group/field[#name='product_id']" position="before"> <field name="new_field"/> </xpath>
<xpath expr="//page[#name='order_lines']/field[#name='order_line']/tree/field[#name='product_id']" position="before"> <field name="new_field"/> </xpath>
I am trying to create a Saved Search for Kit/Package records. Each Kit/Package includes two component SKUs. The desired result is to have a Saved Search that pulls in each component SKU into its own column. I would also like another column for each of the respective quantities.
I am using this Saved Search to create an Advanced PDF/HTML template. So, I cannot use a Saved Search that includes summary fields. Also, these items cannot be grouped in the Saved Search because I need to reference them separately in the Advanced PDF/HTML template.
EXAMPLE: Kit/Package SKU "XYZXYZ" includes 10 x "Component 1" and 1 x "Component 2". The Saved Search would include the following columns:
Kit/Package SKU
Component 1 SKU
Component 1 QTY
Component 2 SKU
Component 2 QTY
How can I accomplish my goal?
This can be done. Follow the steps below:
1) Create an Item saved search.
2) Use the following settings
Criteria: Type is Kit/Package
Result: Name
Result: Member Item (Or whatever you're using for SKU. Maybe Member Item Fields...Internal ID)
Result: Member Quantity
Available Filter: Name. Show in Filter : Yes
Save & Run
3) Create the Advanced HTML template. Use this code
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
</head>
<body>
<table>
<tr>
<td>
<#list results as result>
<#if result_index==0>
Kit/Package SKU ${result.itemid} includes ${result.memberquantity} x ${result.memberitem}</#if>
<#if result_index==1> and ${result.memberquantity} x ${result.memberitem}
</#if>
</#list>
</td>
</tr>
</table>
</body>
</pdf>
This is currently not a feature supported by NetSuite. There is an enhancement request submitted for this feature.
I am trying to list all items in a section of Kentico as a drop-down list but want only one field value to be returned for each document.
What I have tried
Lists Nothing:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren.WithAllData.All.GetValue("FooBar")
Lists all document information:
Documents.WithAllData["/Foo/Bar/Bar"].AllChildren
You'd use a macro similar to this:
<select id="ddlItems">
{% Documents["/Foo/Bar/Bar"].Children.WithAllData.ApplyTransformation("cms.event.transformationname") %}
</select>
To list out all your items. The transformation will then have your column information:
<option>{% FooBar %}</option>
**** UPDATE ****
Based on your comment, you can simply use a sql query (which a macro will run anyway). If you know what page type you want to query you can go directly to that page type's table:
SELECT Col1, Col2, FROM Content_YourTable
If you need the data from your page type based on a particular path in the tree, then you can use something like this:
SELECT Col1, Col2
FROM View_CMS_Tree_Joined
INNER JOIN CONTENT_MenuItem on DocumentForeignKeyValue = MenuItemID
WHERE NodeAliasPath like '/Foo/Bar/Bar/%'
AND Classname = 'cms.menuitem'
Alright, here's my scenario :
I have 2 custom lists : Orders and Items. The Items list contains a field Description (text) and a Amount Per Item field (calculated). The Orders list contains a Total amount field and a Items field (lookup on the description field in items which allows multiple values selection).
Here's a more visual explanation :
Orders
Total amount
Items (lookup on the description field in items which allows multiple values selection)
Items
Description (text)
Amount per Item
I would like to do the sum of the Amount per Item field of the selected items from the Items lookup field from Orders and put the value of the sum in the total amount field in Orders
Any suggestions? Is it possible to do this in SharePoint 2010 without code? If not, could you show what the code would look like?
Thanks.
You could try
OrderList.Total = OrderList.Items.Sum(item => item.AmountPerItem);