I'm working with Microsoft Dynamics AX R3,2012 and i want to add a group by field in an dynamics:AxGridView then a sum for a certain field by the group field indicated then the total sum without the group by .Please help me .i didn't find a solution.like what described in this page http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm
You can create a display method to compute your sum on each row. If you do so, don't forget the 'cacheAddMethod' in order not to compute it each time. This is the "historical" way.
More info on display methods.
Or you can create a view and use computed column in it. It will depends on your current datamodel and query you want to run.
More info on computed column in views.
Thanks for your reply,My Problem is not to create display method but the Problem is how to display the sum of subtotal by this display field.So my solution is to add GroupField in the AxGridView with designed field like GoalId in my case.then in the AxGridView i create template field with footer containing label not visible in default. So in rowdatabound i do the total by the new group that known with a test in rowcreated in GoalId 's value changes .Then when i get a new group i put the value of cumul of the previous value of a the previous group and in the footer template i display the total of all rows.this is the solution and thanks so much for your help. but now the problem that i noticed that axgridview have problems after updating data with a groupby fields and with template field.it display noting in this fields
Related
I was trying to enable multi-select for Owner in Employee Time Activities and wanted to try based on below article.
https://asiablog.acumatica.com/2018/01/multi-select-selector.html
Then override view like below:
https://asiablog.acumatica.com/2017/11/sql-in-operator-in-bql.html
However, after I added ValidateValue = false in field:
I am getting this error.
I looked at the custom attribute and I don't think it could be replaced with anything keeping the same implementation.
So, is there any other way I can accomplish multi select feature to allow display Employee Time Activities for selected employees at once besides the ideas mentioned above?
Thanks.
Your primary issue is that DimensionSelector is different than Selector.
Secondary thing to keep in mind that when you do Multiselector you would need to update the field that holds the values to have a longer length. The way a multiselector works is that it stored the saved values as a ; (semicolon) separated string. so if the field was 10 long you would want to expand to whatever you expect the max number of selected values would be, e.g. 40 would be 480, 40x10 + 40x2, 10 being the original size, 2 being a semicolon and space. (hope that makes sense :) )
Next you would have to update all the functional business logic to then parse that string and loop each, in this case, employee for the functions.
I am speaking very generically here. So not sure what you're actually attempting to do here, but one would assume that if you were selecting multiple employees you would want records to reflect accordingly.
I have a question based on crosstab in Cognos. I need to display values based on months. Due to i dont have an time hierarchy i need to create a year/month group by myself. I have a datefield that contains only dates per day. In this case i created a new field that groups the datefield based on year/month.
Monat = cast(extract(year; [Reference Date]);varchar (4)) + '/' + cast(extract(month; [Reference Date]);varchar(2))
I am using this Element (Monat) in my crosstab as displayed below. Now the problem occurs - as soon as i drag the hierachy(Reporting Structures) into the crosstab (marked red) i got the correct values, but if i drop a specific member (COGNOS_Bericht) out of the hierachy it doesnt display any values. Does anyone had any similiar problem and knows how to solve it?
Thanks in advance
It could just be that there is no data at that intersection. If you replace the row edge with children([ALL]) what does the crosstab look like. Additionally, given you are in a dimensional source, it would probably best to do the time calcs in an actual time dimension.
I'm not able to take the means for a large dataset given that the amount of attributes is irregular.
I have posted a simplified case for the problem. It explains the problem very well.
An idea that I came up with: Make a filter to condition on a single attribute. However, still, I don't see a way to do this in an efficient way (other then doing it all by hand).
see excel file:
All help is much appreciated.
I'm basically looking for a function/method to achieve taking means of all different attributes conditioned on each person for a large dataset without doing it by hand.
You can use AVERAGEIFS() inside an IF:
=IF(OR(A2<>A1,B2<>B1),AVERAGEIFS(C:C,A:A,A2,B:B,B2),"")
the ifrst part of the if tests whether the row starts a new group either by the person or the attribute changing. Then it uses AVERAGEIFS() to return the correct average of that group. otherwise it returns a blank
What you want to do can be accomplished very simply with a pivot table.
Simply select one of the cells inside the range of data you want to process(See the video for general use of a pivot table https://www.youtube.com/watch?v=iCiayB6GrpQ )
go the insert tab and insert pivot table.
Once you have it, simply check people, attribute, and values. Then drag people and attribute into rows, drag valut into the values window, select the drop down list and change it from sum of value to average and you should be done. https://i.stack.imgur.com/nYEzw.png
I want to show the product difference price in the dropdown list for configurable product (choose an option) same as in magento 1.X Thanks to all!
This is a known issue in Magento 2
The JavaScript array which is used for the picklist is generated in the method getJsonConfig() in the Class
app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
There you see two arrays added to $config: attributes and optionPrices.
attributes seems to contain the labels that are used for the dropdown.
optionPrices contains the prices which are used to refresh the price after a customer selects a different option (with a different price associated).
This will make it very difficult to show the price difference in the dropdown as the price difference values would need to be calculated in the JavaScript.
One solution that is relatively easy to implement would be something like this, but this will show the final price of each option, not the price difference:
Create a Magento 2 plugin module that is triggered after the getJsonConfig is executed: afterGetJsonConfig()
Then use the output of the getJsonConfig in afterGetJsonConfig(): $config, this array contains attributes and priceOptions array, amongst others.
First jsondecode $config
Then walk through the attributes array to determine the available options
For each option, find the matching price in priceOptions array.
Update each option label in the attributes array by concatenating the price (correctly formatted) to the existing label.
jsonencode $config
return $config
Within my InfoPath form (which has to be loaded within a SharePoint Portal by the browser)I have a repeating table containing multiple fields. Now I would like to make the first textfield autoincrement starting by 1. How exactly can I do this?
I have already heard of a way by using the "count" function but this produces errors or in best case a static number which unfortunately does not count.
The function I have added for the field is "count(.) + 1"
Any suggestions?
Let's say your repeating group is called "item" and your autoincrement field is called "index". The default value of the index field should be
count(/my:myFields/my:item)
This should count correctly for you.
I suspect you really want position(). Count is just going to return the total count of nodes that match the xpath expression you give it.