Sir I am using first time ListPicker
My PHP file is like this
<?php
date_default_timezone_set("Asia/Karachi");
$servername = "localhost";
$username = "id20649282_hassan";
$password = "Tariq@123456";
$database = "id20649282_asiacng";
$dbc = mysqli_connect($servername, $username, $password, $database);
if (!$dbc)
{
die("DATABASE CONNECTION FAILED:" . mysqli_error($dbc));
exit();
}
$button = mysqli_real_escape_string($dbc, $_GET["button"]);
if ($button == "btn_Get")
{
$query = "select * from world";
if ($result=mysqli_query($dbc, $query))
{
/*
while ($row = mysqli_fetch_array($result))
{
echo $row['country'];
echo "<br>";
}
*/
$numColumns = mysqli_field_count($dbc);
if ($numColumns > 0)
{
$en_csv = '';
while ($row = mysqli_fetch_assoc($hacer))
{
foreach ($row as $column)
{
$en_csv .= $column . ",";
}
$en_csv = rtrim($en_csv, ",");
$en_csv .= "\n";
}
$en_csv = rtrim($en_csv, "\n");
print $en_csv;
}
}
else
{
echo "ERROR: Could not able to execute" . $query . " " . mysqli_error($dbc);
exit();
}
mysqli_close($dbc);
exit();
}
?>
and here are blocks
When I click Get Data button then it shows responsecode=200 like this
but ListPicker is not showing data
t_ListView_with_Mysql.aia (3.2 KB)
Please help
ABG
June 23, 2023, 10:19am
2
Set list picker.text to response content
Sir now it is showing blank list.
I think responseContent is empty, when responseCode is 200 then why responseContenct is empty?
Please help
TIMAI2
June 23, 2023, 10:36am
4
Something wrong with your php file, no response content returned, can't even get back the error message. Doesn't return anything in a computer browser, either.
TIMAI2:
Something wrong with your php file, no response content returned, can't even get back the error message. Doesn't return anything in a computer browser, either.
Sir I added these codes in php
while ($row = mysqli_fetch_array($result))
{
echo $row['country']."\n";
echo '<br>';
}
Now ListPicker is showing data like this
I think there is another issue.
Regards
Sir this time I have these blocks
ListPicker is also showing data
But I want to display data like this
Select Country: Afghanistan
Dialing Code: 93
Please
Your list item contains country code,country name
You can use split text at , block from text blocks then select first item for country code and second item for country name and show it in the layout.
Sir I used this block for splitting but it shows data like this
Please
Put , (comma) in at block
1 Like
Sir I used this block
The result is
But I need only Afghanistan in ListPicker after selection.
t_ListView_with_Mysql (1).aia (3.6 KB)
Regards
Try this. And also uncheck show lists as json checkbox in screen1 properties.
Sir now I have these blocks
Data is showing in ListPicker like this
but when I select any item from ListPicker then this message appears
t_ListView_with_Mysql (2).aia (4.0 KB)
Please
TIMAI2
June 23, 2023, 6:42pm
18
As @ABG shows you need to follow the blocks I provided, SelectionIndex, NOT Selection
Thanks sir it works fine now,
I have a little more request.
I want to apply Filter on this ListPicker so I checked this box
But filter is not appear on ListPicker.
How to apply Incremental search?
Please help