hi all,
Am still new to the flutterflow and not many coding experience apart from python.
with a custom function I wanted to get the id of a supabase table of a row matching to a value (string) given.
columns of Supabase table are;
id (integer)
name (string)
name_japanese (string)
and I want use the function on a dropdown widget. when an item was chosen, I want to get id of the row chosen. as the this table is related to another table by id.
type of return value is Integer and Arguements to the function are superbase row (isList) and a string. and for loop of the table given till found the match with the seletedName argument. This return error. The message is "Error running the function. please contact [email protected]"
int? getRandomRow(
List<VideosRow>? videosTable,
String? selectedName,
) {
/// MODIFY CODE ONLY BELOW THIS LINE
// return id of a row matched with selectedName on column "name" of VideoTable
if (videosTable == null || selectedName == null) {
return null;
}
for (int i = 0; i < videosTable.length; i++) {
if (videosTable[i].name == selectedName) {
return videosTable[i].id;
}
}
return null;
I tried to run a very simple code with no much of meaning like return 1; so I guess something is wrong with getting arguments.
If there is anyone knows about it. Please help me out.
Thanks!