33
Views
11
Comments
Solved
Side by side comparison - as in shopping app
Question

Is anyone aware of a forge component that contains logic for doing side by side comparisons of selected items??
Want to do something similar in an app we are working on, and do not want to reinvent the wheel on this..
eg: In many shopping sites you can select multiple products, and then do a compare, where you get a side by list of the products and there attributes..

We want to do similar thing, with customers requests, and requests details from other requests..  (perhaps an earlier version, or source requests..)


mvp_badge
MVP
Rank: #2
Solution

Hi Steve,

I'm not aware of such a Forge component, but it'd be also difficult to pull of in a generic way. You'd need an Extension that investigates (through reflection) the input records and outputs the differences in a generic way (as a Record List).

Also, with OutSystems it's a bit of a challenge to have a variable-column layout, so if you want to be able to select more than two different products, you'd have to do some trickery to get it to display nicely. Not impossible by any means, but not quite easy either.

mvp_badge
MVP
Rank: #17

Hi Steve,

Most complicated problems can be broken down in several small problems.

Looking at your problem description I would suggest the following:

  1. Create a screen using the 3 Column widget.
  2. For every column create a block, (Block1, Block2, Block3)
  3. Place each block in the corresponding column placeholder in the screen.
  4. Your user needs to be able to select 2 items to compare, the Id of the first should be the input to block, the Id of the second item should be input to block2.
  5. In block1 get the data form the item based on the input parameter 
  6. In block1 add a 2 column widget, in the first column of that place the label for each input, and in the second the inputs. Forget for now what should be visible or not, you add that later.
  7. In block2 get the data form the item based on the input parameter 
  8. In block2 show the the data from the record retrieved in expressions in the same order as the fields in block1.
  9. I block3 add the the both item ids, get that data and display what you want.

This should be the basics.

From there you take step by step each requirement.

Break this big problem down in smaller steps, and delivery them one by one.

My list is far from complete, but I just tried to show you how you can decompose your problem into smaller once that can be implemented as independent pieces of functionallity. 

Regards,

Daniel

mvp_badge
MVP
Rank: #17

If you drag all attributes from the entity, to the web block the inputs and labels are generated for you. To be honest to me it doesn't sound all that complex, just some work.

Rank: #1294

:)

Thanks.  (Sort of regretting posting this at the moment.. )

mvp_badge
MVP
Rank: #17

Hi Steve,

I think if you just start and take it step by step it works out.

Try the concept first with a hand full of attributes. Validate it van work then implement all attributes.

Regards,. Daniel


mvp_badge
MVP
Rank: #17

The purpose of my replies as to encurage you, not the opposite:;

mvp_badge
MVP
Rank: #17

Hundreds of attributes on a screen seems to be an extreem UX design. 

But if that is being the design that is thought the correct one then still I would break  down a big problem into smaller once. Most likely there are groups of attributes related to each other an positioned smear each other. The web locks per column can be build out of webblocks too.

Either way with hundreds of attributes, you will have a lot more work than with for example 20 more attributes.