I'm thinking of using Outsystems for a development task where the content of a layout screen would be dynamic. I know how this would work on other platforms, just not familiar enough with Outsystems yet. Help /pointers appreciated. Basically:

  • A list of categories is defined in the database
  • There are an associated number of questions per category
  • When I click on a category, I want to pull the list of questions from the database and present them with a yes/no tick box.
  • I'll then add some logic which dictates what happens on yes/no click.

I've attached a sketch of what I'm after roughly below. I'd prefer not to have to create all these manually, and the layouts will be subject to change (questions may be added/removed in future). So dynamic building is a necessity. Thoughts?

Hi Steve,

All of this looks possible to accomplish with List Records and Webblocks. You'd keep your categories and questions in the database making your lists grow or shrink according to your needs. 

Your layout doesn't need to be dynamic, it's your data that will change according to what you configure.

Hi,

Check the attachment for a sample.

Regards.

Prasad Rao wrote:

Hi,

Check the attachment for a sample.

Regards.


Thank you! Implemented now. I'm just testing to see how I would then add a web block on yes click.I presume this is possible?

Hi,

Yes that is possible. You might have to change few things

1. Change the table record to listrecord and format the questions and radiobuttons to your liking

2. Have if condition after the above container and with condition set to answer. In the true part you can add the webblock.

I hope this helps.

Regards.

Prasad Rao wrote:

Hi,

Yes that is possible. You might have to change few things

1. Change the table record to listrecord and format the questions and radiobuttons to your liking

2. Have if condition after the above container and with condition set to answer. In the true part you can add the webblock.

I hope this helps.

Regards.

So I've switched to listrecord. On yes click I want to activate another webblock? Or do I need to store it within the CategoryQuestions webblock? I was think I could nest a second web block within CategoryQuestions, then pass a list to that, but can't see how to make that connection.. Can start another thread/question if best.


Hi,

I am not sure about the use case fully so cannot comment about passing the list, but you can nest call another web block inside a web block (Check the attachment for example)

Regard.

Prasad Rao wrote:

Hi,

I am not sure about the use case fully so cannot comment about passing the list, but you can nest call another web block inside a web block (Check the attachment for example)

Regard.

Yes - this is what I was thinking & had roughly got to. In your example how would you refresh WebBlock1  from the OnChange action within CategoryQuestions? So in CategoryQuestions, when a value = true, populate/refresh WebBlock1.


Thanks for your help - rebuilding your example last night really helped me wrap my head around the interactions better...

In your first example - is the result of the yes/no stored anywhere? I had presumed in the CategoryAnswers table but can't work out how to view it. Here is the logic I'm looking to implement.

  • Grab list of themes & associated questions & build page with a yes/no 
  • When yes/no selected, write this back to a table.
  • On change of yes/no. If yes, populate another webblock, nested within the question which gives further parameters from another table. (e.g. question could be "Does this criteria apply?" If yes is selected, then the list below would be details on that question)

I think this is implemented by:

  1. WebBlock1 preparation to populate the initial page.
  2. Nested WebBlock2 in the above which displays nothing if selected answer is no. On change event which if WebBlock1 yes = true, get associate details for that question & refresh WebBlock2


Hi,

You are not suppose to copy exactly because I have user static entity for questions and category, depending on your usecase it can be regular table if you have Back office application with screen to add category or questions. If done correctly, I am suppose to write to answers table on change, then refresh the aggregate and finally refresh the list record but since its sample I skipped it.

Regards.