The documentation for the Open Graph beta says:
Group by - Option is only available if your Aggregation is displaying
Objects. This option allows the aggregation to group by a property of
the object. For example, you can group by Movie object's type, to show
how many times you've watched a certain type of movie.
How do you select this?
I have Egg objects with that have a Collection property and want to aggregate based on that.
For example, one aggregate story would include Egg objects with Collection set to "Easter" and another would include Egg objects with Collection set to "Christmas".
Group By always seems to default select the object type I choose for Data to Display and I don't see an option to manually set this. Nor do I see a way to set the Aggregation Title to be the name of the group.
You can't group by a String, only an Object. Try making an Object Type called Collection and make urls for each collection. Then Collection will show up in Data to Display and you can group by it.
Related
The problem I'm having right now is related to advanced filtering in shopify theme "Fashe"
I have made certain filter groups in my store using advanced filtering by group option. But when i choose a filter in one category, I want other filters to be updated as well related to that category.
Like If i choose collection type to be of one kind, i want the collection colors to be related to those kind only. right now it shows me all the colors available in my store. If choosing one filter, it should change the values in other filters also based on the collection type.
If somebody has this issue resolved, I would be very much pleased if you help me with this.
SECOND THING
One more issue is when I select filter A, the theme gives me the results associated with that filter but when i click Filter B (filter A being selected already) the theme gives me no results instead it shows that no products matching. Somebody with this issue???
Example: www.mytheme/collections/fine/opt1+opt2
This works as an AND statement. But I want to show results from both, opt1 and opt2.
Shopify should work with OR statements. Like combined results of filter A and Filter B.
I have an app built based on the a SharePoint list called "Proposal Tracker". One of the fields is a lookup field that provides a drop down from another list called "Employees". I am trying to filter this field, so that when I select it, the only employee names that are shown are the "active" employees.
I've tried adding this into the DataField of the one data card I'm trying to filter, but I get an error.
Filter(Employees,Status.Value = "Active")
Use Filter(CollectionName,Condition)
e.g: Filter(Employees,Status = "Active")
When you have a dropdown control selected you can choose its dependencies from other controls on the screen.
Example:
I have two entities Properties and Bookings.
I need to know the URL structure in case I'm filtering the properties base on query on bookings.
In my case I need to get the properties which are free (not occupied) at specific date.
Can it be
api/properties/free/{date}
Or
api/properties/bookings?bookingDate!='1-1-2017'
Or
api/properties?bookingDate!='1-1-2017'
it seems for me that the last one is the more appropriate but the filter is on the bookings not on the properties which is not obvious.
The Facebook Graph API has a interesting way of doing nested queries by using a strategy of fields filter.
The fields filter it´s a way of filter specific fields or nested fields of a rouserce. They also create a standard way to inform functions for every selected field like: limit or equal.
Your request would be something like this:
GET /api/properties?fields=bookings{bookingDate.notEqual('1-1-2017')}
For more information about Facebook´s GraphAPI:
https://developers.facebook.com/docs/graph-api/overview/
I created an attribute set and attribute groups with attributes in it. In the admin panel the attributes are listed in groups, like i created them. But on the front productpage all the attributes are listed together, without displaying the attribute group name first.
I would like to display the Attribute Group Name on the product page (more information tab), before the attributes in this group. How do i do that?
There is no way to do this by default in Magento 2.
There are a few ways I can think of to acheive this. Perhaps best would be to extend the getAdditionalData() method in /Block/Product/View/Attributes.php so that it adds the attribute group name (or id) to the returned array.
You would then need to create a local copy of Magento_Catalog/templates/product/view/attributes.phtml and iterate the array returned by the modified getAdditionalData() method sorting it according to the group name and then output the data with group name headings.
I'd be interested to hear of other or best practice approaches to this type of relatively simple extended functionality in Magento 2.
I am querying a Model*, which has a field that refers to another Model. Is it possible to order the results using a field in the linked Model?
So for example:
Car contains a field which refers to its OWner. I want to show all Cars sorted by their owner.
(I don't want to use the statement() method since in that case I would have to write the whole query myself)
(*) using http://typo3.org/api/typo3cms/class_t_y_p_o3_1_1_c_m_s_1_1_extbase_1_1_persistence_1_1_generic_1_1_query.html
Yes, it is possible (don't care for the $constraint for the moment):
$query->matching($constraint)->setOrderings(
array('owner.sorting' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)
)->execute();
Assuming the field in you Car model is named owner and you want to sort by sorting field of the Owner model/table.
When working with 6.2
->setOrderings(Array('model.yourfield' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING))
#Michael and #rob-ot are right. There is one pitfall that took me many hours and that I'd like to mention here:
If your sort field in your related table contains underscores, you have to provide its name to setSortOrderings in lowerCamelCase:
// with database column name my_car_sorting you must define:
$query->matching($constraint)->setOrderings(
array('owner.myCarSorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
)->execute();