Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

Hi,
This is regarding the master detail records. I have products collection, it has product name and other attributes. say I have product p1, p1 would be offered in different colors and each color is priced differently. i.e say p1 has three child records, p1blue - $1, p1black-$2, p1pnk- $3. Child records live in productItems collection with custom foreign key with products. Now in the screen I would like to display product name and couple other attributes and I wanna display a check box for related product items to pick one. Is there way to achieve this other than custom java script?..Thanks in advance

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Master & child records in one frame

Hello Raj,

It depends on your project, maybe you can use just mapping, but most likely you will need the custom js. I think it will be easier.

Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

Hi, I implemented above child relationship as an array in parent collection. so I have quick question. please check the below picks. In the array, weight field is the driving factor. As you can see in the below pic, I have implemented weight as a select menu. I want to display the rest of the field values based on weight selection. what options do I have?. Thank you

Image

Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Master & child records in one frame

Raj,

You can map the child elements of the object-answer only to child UI components. For example, if you have a grid, and you map the array to it, then the child elements of the array can be mapped to the components located in this grid.

Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

That's what I did..but I get below result. am I missing some thing here. Please advise. Thank you Image Image

Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

I mean after the select Menu, next two label's data is not getting displayed(populated). Ideally what I want is, weight data to be displayed in select menu. and next two label's populate the data from selected records. below is my array object.

{"array":[{"weight":"17.63 oz.","price":"7.49","onpromo":"N","promoprice":"","promostart":"","promoend":""},{"weight":"35.63 oz.","price":"9.99","onpromo":"N","promoprice":"","promostart":"","promoend":""}]} Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Master & child records in one frame

Hi Ray,

I'm have some confusing about what you want to implement. Could please provide us result screen shot what you want to get and describe it?

Also if you need to:
1 populate with "details" array select.
2 populate with "details" array some other list.

You need to have this two components(select and other list) in the same hierarhical level.

See details about it on screen shot: http://prntscr.com/4jgwqi/direct

So in this case you need to get out your select component from grid component.

Regards.

Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

Hi Yurii,

I have a product collection with all prod attributes as shown in the below. Each product is available in different sizes and each size is priced. So I have created product weight & price in an array

Image

below is the Response from the service

Image

in my UI screen , I wanna display product name, image, desc, menu select to display all available sizes; display the price based on size selection

Image

Hope I explained it well. Below is app mapping

Image

I get below result; No data is displayed in price label

Image

Raj7069635
Posts: 0
Joined: Wed Aug 27, 2014 3:33 pm

Master & child records in one frame

one additional thing; this product screen is product list view

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Master & child records in one frame

Ok, this time it's clear.

I've tested it and need to say - unfortunatly it's a bug.

I've reported it to our developers team.

We will update you here when will have any information about.

Regards.

Return to “Issues”