Select list item: Attempt to get item number 3 of a list of length 1: [""]

Sir I am facing this error message


and here is backgound


My code block is like this

If the data is 0 in specific listIndex then it displays Runtime error message
How to tell block if there is no data then it must display "" (blank space) in relevant textbox.


Dear @Tariq_Mehmood,
play with this (I tested and it works):

The rationale of these blocks is to avoid that a longer list could be attempted to be filled by the data extracted from a shorter one. And also that the labels' list could be filled by a too long input list.
In other words: if the input list length is equal or less than the labels' list, the labels' list is filled by all the elements of the input list, but there is no attempt to access non-existent elements of the input list. On the opposite, if the input list length is > of the length of the labels' list, a warning is issued (this should never happen, but in the case...)

Tariq.aia (2.6 KB)


Thanks uskiara for helping but

I shall create a list of labels inwhich I want to show data like this

But how to get data from table to show in lables

How to replace First with p_ltr, Second with p_rat and Third with p_amt

Here is my table



OK I see I've been not clear enough.
The list "Label_list" in your case will contain the name of your labels like:
p-rat;p-amt; etc. till the last label name.
While the list "Input_List" is your "global lista" that is filled in runtime by the split block.

Dear @Tariq,
I've sent you the corrected .aia via PM, since you have inserted a reference to an uri that is private, I guess.
The one you sent me is missing of the "split" bock, and it has more input fields than the lables, therefore i've duplicated the function that fills the labels. On my phone it works (sometimes I cannot access the database, but it's a problem of internet access, not of the algorithm).

Best wishes.

1 Like

Thanks sir, it works fine.

1 Like

Dear @Tariq_Mehmood,
glad having helped you.
All the best.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.