1

I have an Accordion widget that is connected to a datasource 'Projects'. I have a list of all the projects and their details. However, each record in the projects datasource has a string field called "Project Type" which can contain one type or several types (seperated by commas), for e.g "Field,Qual,Quant" etc.

The challenge I am facing is that I want to create another accordion that contains rows depending on the number of types of project. For example if ProjectID P23 has project type as "Field,Qual,Quant", then when I click on the accordion for Project P23 it must expand further accordion widgets based on the number of projects types, in this case, 3 more rows should be visible.

What I am thinking is that whenever I click on a Project row, it should create a datasource with 3 records depending on the number of project types. Then I can bind this data source to the subsequent accordion. However, the problem with that this will become a server-side call and cannot work synchronously. I want to do this on an onClick event of the first accordion so that results should be instant. And whenever the accordion closes, the datasource should get empty, so for any other project, it should be a dynamic process.

Any leads would be greatly appreciated.

P.S. I know App Maker is getting decommissioned.

Cooper
  • 59,616
  • 6
  • 23
  • 54
Talal Zahid
  • 128
  • 2
  • 12
  • 1
    Can you share what you tried so far to achieve this? Thanks – Aerials Mar 12 '20 at 11:15
  • Exactly what I was thinking to do. So the accordion is connected to the Projects Datasource. Now when ever I click the accordion, it creates a number of records in a seperate datasource which are equal to the number of types a project has. After the loading is completing, I update the datasource of the subsequent accordion, which shows up after its datasource has been updated. – Talal Zahid Mar 12 '20 at 12:29
  • @Aerials Can this be done instantly? Like a temporary datasource can be created on the client side which could be connected with the second accordion. So the code can run linearly and I can avoid the server call. I dont need the second datasource to be permanent, its just used to populate the second accordion. – Talal Zahid Mar 12 '20 at 12:33

0 Answers0