CSOM, GroupBy, specific ViewFields and system fields

From my SP library, I would need to retrieve a list of meetingID grouped by MeetingID. I tried several attempts with CAML but it didn’t work:

CamlQuery query = new CamlQuery();                     query.ViewXml = @"<View>                                           <Query>                                             <Where>                                                     <And>                                                                                         <And>                                                     <Eq>                                                         <FieldRef Name='FSObjType'/>                                                          <Value Type='Counter'>0</Value>                                                     </Eq>                                                     <Geq>                                                         <FieldRef Name='Modified'/>                                                         <Value IncludeTimeValue = 'TRUE' Type = 'DateTime'>2016-01-01T15:55:52Z</Value>                                                                </Geq>                                                   </And>                                                 <IsNotNull>                                                     <FieldRef Name='Title' />                                                                                               </IsNotNull>                                             </And>                                         </Where>                                                                                <GroupBy Collapse='True'>                                             <FieldRef Name='MeetingID' />                                         </GroupBy>                                                                                 <OrderBy>                                             <FieldRef Name='DocID' />                                                                                </OrderBy>                                     </Query>                                      <ViewFields>                                         <FieldRef Name='MeetingID'/>                                     </ViewFields>                                  </View>";                      ListItemCollection items = list.GetItems(query);                     cc.Load(items, o => o.Include(p => p["MeetingID"]));                     cc.ExecuteQuery(); 

Considering that the CAML is returning the MeetingID and plenty of system fields, I had to use the Include syntax. However,on my 1500 items in SP, none of them have been grouped (I should have only 50 unique MeetingID). Again probably related to the system fields which prevent the grouping to occur…

I also tried:

cc.Load(items, o => o.Include(p => p["MeetingID"]).GroupBy(g=>g["MeetingID"])); 

But this one return an error…

I also tried to see if a property similar to ViewFieldsOnly exist in CSOM but it doesn’t seem to be the case.

Your help will be appreciated

JSLink for same list view webpart in a page hide some fields

we need to create single jslink file for 2 same list view webparts configured on the same page

here are the rendering rules that is defined

  1. First Webpart should have some columns to be shown/some columns should be hidden
  2. Second Webpart should have some columns to be shown/some columns should be hidden.

we found out something like this for conditional rendering ctx.wpq== “WPQ3”

how can we render the view with such condition any help would be appreciated?

Ubuntu 18.04.2 – After upgrade facing issue with input type=”password” fields – Loosing focus

Ubuntu 18.04.2 – After upgrade facing issue with input type=”password” fields – Loosing focus …

I recently update and upgraded my system like every week. When I try to enter a value in a input type=”password” fields on pretty much every website (using firefox), it constantly looses focus and it makes it almost impossible to enter a value.

How can I solve this issue? That’s my setup:

~$   sudo apt-get update ... ~$   sudo apt-get upgrade ... ~$   apt-cache show firefox | grep Version Version: 68.0+build3-0ubuntu0.18.04.1 Version: 59.0.2+build1-0ubuntu1 ~$   lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 18.04.2 LTS Release:    18.04 Codename:   bionic 

I found a similar issue here:

https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/1765304

how to interact with legacy database that its tabels dose not have some fields

I am working on project with spring boot, hibernate and SQL-Server. for some reasons Some of the project database tables should be synchronized with the legacy database tables that does not have some necessary fields …

The question is, what is the solution to this situation and whether there is the best practice for this situation??

The solution I’m thinking of is to create a new table for fields that do not exist in main table, with a reference to the main table and use join to select.

Magento 2 Add Custom fields to Bundle Product add options

want to do this

enter image description here

I have followed similar (Magento 2 add new custom option text field) topic but it’s about custom options for simple products. Somebody in commets say’s that he achieved this for bundle following this link. But It didn’t work for me.

Here I what i have:

di.xml file in my module

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <plugin name="bachus_bundlecontextpros_custom_option" type="Bachus\BundleContextPros\Plugin\Bundle\Ui\DataProvider\Product\Form\Modifier\BundleCustomOptions" sortOrder="1"/> </type>  </config> 

and my BundleCustomOptions class

namespace Bachus\BundleContextPros\Plugin\Bundle\Ui\DataProvider\Product\Form\Modifier;

class BundleCustomOptions {

public function afterModifyMeta(     \Magento\Bundle\Ui\DataProvider\Product\Form\Modifier\BundleCustomOptions $  subject,     $  meta     ) {         $  meta['custom_options']['children']['options']['children']['record']['children']['container_option']['children']['container_common']['children']['custom_text'] =         $  this->getTitleFieldConfig(             200,             [                 'arguments' => [                     'data' => [                         'config' => [                             'label' => __('Custom Text'),                             'component' => 'Magento_Catalog/component/static-type-input',                             'valueUpdate' => 'input',                             'imports' => [                                 'optionId' => '$  { $  .provider }:$  { $  .parentScope }.option_id'                             ]                         ],                     ],                 ],             ]             );         return $  meta; }  /**  * Get config for "Title" fields  *  * @param int $  sortOrder  * @param array $  options  * @return array  */ protected function getTitleFieldConfig($  sortOrder, array $  options = []) {     return array_replace_recursive(         [             'arguments' => [                 'data' => [                     'config' => [                         'label' => __('Custom Text'),                         'componentType' => \Magento\Ui\Component\Form\Field::NAME,                         'formElement' => \Magento\Ui\Component\Form\Element\Input::NAME,                         'dataScope' => 'custom_text',                         'dataType' => \Magento\Ui\Component\Form\Element\DataType\Text::NAME,                         'sortOrder' => $  sortOrder,                         'validation' => [                             'required-entry' => false                         ],                     ],                 ],             ],         ],         $  options         ); } 

}

Update: Now I am able to view the custom field in bunlde options by modyfing Magento\Bundle\Ui\DataProvider\Product\Form\Modifier\BundlePanel.php

adding just after requierd

'bundle_template' => [                'arguments' => [                 'data' => [                     'config' => [                         'dataType' => Form\Element\DataType\Text::NAME,                         'formElement' => Form\Element\Input::NAME,                         'componentType' => Form\Field::NAME,                         'description' => __('bundle template'),                         'dataScope' => 'bundle_template',                         'label' => 'bundle template',                         'sortOrder' => 40,                     ],                 ],             ],         ], 

UPDATE I am able to save the value in data base but not see in admin

I just simply crated colum with exact name that my new custom field has in table catalog_product_bundle_option but it didn’t work.

I would appreciate any help. Thanks

What are the “scalar fields” and “composite fields” in JAVA?

Need to understand the below definition, from the protobuf tutorial:

mergeFrom(Message other): (builder only) merges the contents of other into this message, overwriting singular scalar fields, merging composite fields, and concatenating repeated fields.

Based on the answers found here, I could assume that:

Question 1:

  • A. String is a scalar field, since it’s not an array.

OR

  • B. String is-not a scalar field, since it’s (like) an array of chars!

So, I would want to have clarity on what are the EXACT scalar and composite fields in JAVA? And why?

Question 2:

I assume Object to be of ‘composite type’. If that’s the case, how would objects be merged, in Protobuf?

If Object is not a ‘composite type’, why?, then?

Create Calculated Field using parts of existing fields

Here’s the example: In pivot table, I have a field called MARKET (my data structure currently show it as one field, not seperated items) which contains two items Vietnam & Vietnam in.SR. Now I want to create a calculated field with the formular: Vietnam in.SR – Vietnam.

However, I don’t know how filter this data in a calculated field. Anyone has any idea?

Note that: I dont want to change my data structure, to generate seperate items for MARKET since I need seperate items for another data points.

Thanks in advanced.

Try to googled solutions but seems to hopeless so far.

How to use ‘searchCriteria’ and ‘fields’ in REST API for fetch orders

I am using below curl_init like this,

$  webSiteUrl = 'mydomain.com'  $  last2DayUpdated = date('Y-m-d',(strtotime ('-1 day', strtotime(date('Y-m-d')))));  $  ch = curl_init("{$  webSiteUrl}/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]={$  last2DayUpdated}&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq"); 

But I want to fetch particular info like billing_address,customer_firstname,customer_lastname

For this, I need to use fields parameter.

But both parameters searchCriteria and fields are not working with each other. Only single parameter is working.

Anyone knows how can I use these both parameters together?