Is there a way to group records by team

Ankush asked on March 4, 2019

Following is the unit of data.
{ Value: 100, Vendor: “Vendor A”, City: “Pune”, Team: “Team A Team B” }
Now this record can have multiple teams. Accordingly if user selects City and Team fields to pivot on. We want to show two records one for Team A(value 100) and another for Team B(value 100).
To achieve this if I split this record into two separate items as shown below, then pivot on City and vendor will show one record with value 200, whereas it should show one record with value 100.
{ Value: 100, Vendor: “Vendor A”, City: “Pune”, Team: “Team A” },{ Value: 100, Vendor: “Vendor A”, City: “Pune”, Team: “Team B” }
Please suggest a way.

5 answers

Public
Dmytro Zvazhii Flexmonster March 6, 2019

Hello Ankush,
Thank you for writing to us.
We recommend reorganizing the data structure in the following way:
{Value: 100, Vendor: “Vendor A”, City: “Pune”, “Team A”: “Team A”, “Team B”: “Team B”}.
Such an approach should match the described behavior.
Please let us know if the suggested solution works fine for you.
Regards,
Dmytro

Public
Ankush March 6, 2019

Hi Dmytro,
With this suggested approach, field list will show following options :-
“Value, Vendor, City, Team A, Team B”
where as it should have shown “Value, Vendor, City, Team” options. I think flexmonster already has captions available, if yes, can you point me to correct documentation.

Public
Tanya Gryshko Flexmonster March 7, 2019

Hello, Ankush,

Thank you for your reply.

We would like to confirm that it is possible to set captions when specifying the slice. For more details please refer to this doc:
https://www.flexmonster.com/api/slice-object/.

Please inform me if you have questions.
Regards,
Tanya

Public
Ankush March 8, 2019

Hello Tanya,
Thank you for your reply.
While writing my previous reply, I thought caption would solve the problem along with the work around suggested by Dmytro. But it doesn’t seem to be. Can you answer the actual issue. Again re-iterating it below.
‘With this suggested approach, field list will show following options :-
“Value, Vendor, City, Team A, Team B”
where as it should have shown “Value, Vendor, City, Team” options.’
 

Public
Dmytro Zvazhii Flexmonster March 11, 2019

Hello Ankush,
Thank you for your feedback.
Yes, you are right, the field list will show the following options: “Value, Vendor, City, Team A, Team B”. Still, it is the only way to handle one to many relationships for now.
In the other way, you will get certain restrictions which you have described in your first message.
Please let us know in case of any other question.
Regards,
Dmytro

Please login or Register to Submit Answer