Create Dynamic Card for every pair of fields per record

Hi All

I have an interesting programming question

From a sql query, I return ONLY ONE RECORDSET.

That recordset contains pairs of fields [ info_08_title ] with a value and [ info_08_desc ] with a value. See screen dump.

What I need to do is to generate a Dynamic Card for every pair.

One card for [ info_08_title ] and [ info_08_desc ]
another card for [ info_09_title ] and [ info_09_desc ]
another card for [ info_10_title ] and [ info_110_desc ]
right up to
[ info_16_title ] and [ info_16_desc ]

I cannot make every pair its own record. That would be easy but not the way the insert works or should.

Can it be done?

Thanks as always
t

Hi Rogerio

Thanks for answering

Question 1:
Do you want to show different fields - YES but (only two fields) in pairs per card.

One card for [ info_08_title ] and [ info_08_desc ]
another card for [ info_09_title ] and [ info_09_desc ]
another card for [ info_10_title ] and [ info_110_desc ]
right up to
[ info_16_title ] and [ info_16_desc ]

Question 2: One question: what was this table created for
The table was created to record the radio program time slots per day per station

So, when the station sets up the program for the day they do ONE INSERT for that day which inserts all the activities per timeslot with its description
[ info_08_title ] and [ info_08_desc ]

What this means is
[ info_08_title ] is the timeslot from 08:00 to 09:00am. Its the Title of the Show
[ info_08_desc ] is the timeslot from 08:00 to 09:00am. Its the Description of the Show

Thanks

1 Like

Thanks to address your points

This table is alreay a Relational table to another primary table called “nodes”

you see, I have one main table called “nodes” with a primary key on Node_No so you can see that each “node” has its own daily programming inserted into this related table.

as for your suggestion of using an if block, I don’t know how I would set that up to act on two fields at a time, create a card and move onto the next two fields.

or - PERHAPS
Seeing as there is ONLY ONE RECORD RETURNED, might something like this work

Where I create a Dynamic Card after each pair of fields???

Thanks

but this is a side issue.

Please can you look at my block and tell me if you think it might work

AFTER EVERY “PAIR” of fields (the two I want) I CREATE a card???

Im sorry… I dont understand…

but might not this work - creating a card after every pair of fields?

Regarding you r comment about the database.

Let me try to explain myself betteer.

I have 256 “nodes” or Radio stations.

each node has a daily program with 8(eight) timeslots in the day

So what Im doing is inserting the daily program for each node into a table as a record with a date and a Node number

My SELECT does a select on Node_No (to get the correct station) and the program FOR THAT DAY.

That’s why having a record for each timeslot will not work!

It will work yes…but here is Kodular community…forget it…

Please can you hellp me understand how, when you say I should create a seperate record for each timeslot?

or does “forget it” mean - your out?

#off-topic
20:09 pm
I’m trying to change the rubber on the refrigerator door…

:slight_smile:
its 01:10 here and Im struggling to get this app done. :slight_smile:

first make a two items into a single list like ((item1 item2)(item1 item2)()()()())()…)
now you can count the list, it will give you total pair list. and create dynamic card horizantally for two card in a vertical arrangement with label. In the first horizantal card use one label and another label in another horizantal card.
For label one use select list item(index 1) select list item (global) (index get number)
For label one use select list item(index 2) select list item (global) (index get number)

If not create two vertical scroll arrangement in a horizontal, then create one dynamic procedure for VA1 for first item and create another dynamic procedure for another item.

Hi

you say make two items into a single list. How does one do that?

Thanks

Make 2 lists, with the names of the fields and use select item list block with the number of for each.
Hugs
#off-topic
Your algorithm will be more complicated because your database was designed wrong.
And every search in the database will be more work.

Thanks for the effort, but you misunderstood my requirements

I don’t need to return two fields - I needed to act on two fields.

But It’s Ok. As I said, I have a messy solution that works

Thanks all the same

You need to show the content of 16 fields ( fixed ) , every 2 :
title1
description1
title2
description2…
title16
description16
And I told you how to do it…

Please if you dont mind… can you show me?

Thanks