![]() I don't really care what your exact SQL problem is. I dont know if my exact field you want to aggregate or merge is correct from all the details you've provided. If you dont like Rules, then use Computed Field, but Rules is more flexible. Save or compute new additional data you store per-record to make your Views query easier. Update your query to use this new piece of data, which is simpler to compute using Views.Using Rules on node insert scan all Containers of title BLK001 and examine date_of_loading - if the newly inserted Node is the earliest date to be loaded set is_first_load_date to TRUE, set all other NIDs of this Container to FALSE.Default it to FALSE for all entries of your content type.Add a custom field called is_first_load_date as boolean value to your content default.From all possible entries for a Container (such as BLK001). You merge results provides multiple date of loading. Make you're life easier and give yourself more data. So I keep saying your task is difficult as-is, with the data you have on hand and the format of the data. I suspect this would difficult, and I suspect you don't know what raw SQL would achieve the list you want. If you could try to make the raw (non-Drupal SQL) you wanted that achieved this query with the data you have as-is, you could then try to use Views Extra Handlers to contain the custom SQL needed, or hook_query_alter to change the query Views uses to achieve the result you want. I repeat - you're trying to do something that is essentially too complex for Views by itself, and you'll have a hard time finding a magical set of Views related modules that will be allow you to create all the business logic you want within Views SQL. I believe my 1st answer may still help others. I am providing a 2nd answer, as it's drastically different from the 1st. Providing a list of containers,with the current bill of lading "N°ī/L", the current cycle and merging all the positions fields ![]() Saved and "position container" is "on board". For example if IĬreated a new position for the container "blk001" in position "inĭepot", I fill the field collection fields "name depot" and "date inįor the bill of lading content type it reference theĬontainers also, I redirect to it every time the node position is So for every node position, I fill the fieldĬontainer, I select "position container", I fill the field collectionįields corresponding to the position selected. The position content type reference the container andĬontains a select list field "position container" and 10 fieldĬollection field, every field collection contains a specifics fields I did as solution, I created 3 content type : container,position,bill Information about previous positions in a form "bill of lading". If the container is on board we have to fill all Passage through those positions from the start to the end a Of loading.) until being in the vessel( position: on board), or itĬan be in an exceptional position like "reformed". Pass by a number of positions (in depot, at port of delivery, at port ![]() The objective was tracking the containers, so I have to showĬontainers and there currents and previous places. I'll explain my use case below to show the purpose of creating this view: Or how I can hide/remove rows which have cycle smaller than the max cycle value for every every container -see the image above-? I couldn't do it with views filter. Is there a way to do that using views merge rows? or I have to use an other solution? I'm using Views merge rows to grouping rows by some fields, It worked good for me, but in some fields I want to show just the first filled value that means: merge uniques values+use the first value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |