But now i am trying to filter what a user sees based on the first column value. So that user has a value stored in app and if the first column value matches that value show THAT user THAT row, and any row that ‘belongs to that user’ based on that value.
So only the first 2 rows should show up for that blue user and row 3 and 4 should show up for the red user:
The thing is that the ‘cuit’ belongs to a ‘store owner’, and he needs to be able to have access to his products but not be able to see other ‘store owner’s’ products or delete them.
So I can’t have a spinner where anyone can select the cuit number.
I have that cuit for each ‘store owner’ stored in app in ‘info_dni’ text (it pulls it in from firebase on screen initialize), so the idea is to compare the rows cuit with that label and if they match show that ‘store owner’ only his products.
From looking at your explination I think the solution might be around this block:
The value marked 1 is the cuit. I simulated the cuit is 200 so as not to complicate it with long numbers.
There you should put the number obtained from the texbox (the cuit or dni)
If you are missing any more data (I think the “detalle” is missing) add a “detalle” variable and copy the same as the other addItems, only you have to put the AttributeName=detalle (Remember to write it exactly as the columns in Airtable are called, respecting upper and lower case)
@pepocero thanks so much for your help, for taking to time to test and to show me blocks! Just awesome.
I can’t get it to show in my scroll-arrangement, is there anything i’m missing, any previous steps that I might not be getting right?
Here are my blocks and the whole airtable table. The clock is set to give time for the cuit to load from firebase on to the ‘info_dni’ text on screen initialize:
I think you should stop the clock once the rows have been done. At the end of the clock you would have to put a clock enabled to false. If you don’t, that keeps running indefinitely
I am sure the vertical arrangement of the cardview is set to fill parent, I double checked, and it was getting all of the values, unfiltered, with the previous method.
Not sure what i am doing wrong, I’ve never worked with the json components before.
Hi @pepocero thanks a lot for your help. I’ve encountered an issue when trying to delete rows from the cardview and the airtable table.
For example when I want to delete the first row in the USER cardview I use ‘get position’. But instead of deleting that row and card it will delete the first row in the airtable table, even if the USER first row is not the table first row (eliminar is delete):
And there is another issue, when I press delete (eliminar) in the cardview, it deletes a row in the airtable table but the cardview not only does not change, but multiplies the cardview in the app. (so the three items become 6, and if I press delete again they become 9 and so on). When I exit the app and come back in the reapeted items dissapear.
You have to keep in mind that with Airtable, you always have to get the data and then work with it. If you delete something, you have to reload the data again (do another Get All Rows). If you don’t do this, you will have a number of items in a variable list, which will not match the number of products in the airtable (because you have deleted one)
So when you delete, you have to “get all rows” again, and reload the lists into the cardview.
Thanks a lot @pepocero that helped fix the duplication of the cards!!
I’m still having this last issue:
When I get the position of the card to delete it, it deletes that position in Airtable.
So like in this image below, when I delete the first item in my card view it deletes the first item in the Airtable table. But since the table holds rows with other users info they don’t match.
Here the users first item in Cardview is actually the 4th item in the Airtable table, when I delete the card it deletes the first row instead of the 4th row:
@pepocero, I really can’t thank you enough for all the help, for taking the time, explaining things and showing me the blocks and everything, you really went above and beyond and you really didn’t have to, but you did!!
Hi @pepocero I have one very, very last question (if you don’t mind, of course).
I am trying to set the values I get from airtable in labels, but, of course, when I set the labels to the global variables (Json Objects) I get all the values, here for example with prices: