Communication between 2 phones with CloudDB using Listpickers in App inventor2 - app-inventor

i'm working on an application that i developped in App Inventor2. It contains 2 listpickers and i want to establish communication between two cell phones with CloudDB to send selected index from a phone to another.
When I connect the cell phones to the app, I receive the error: List index smaller than 1. Select list item: Attempt to get item number 0, of the list (44 - P...). The minimum valid item number is 1.
Thanks in advance for your advices.

Related

Google Sheets - Removing the used items from drop-down lists

In Google Sheets I have a column containing a list of available Serial Numbers (say, column A).
Somewhere else (say, column B) a user must choose the serial number used among those listed in column A; I use Data Validation with a drop-down list in order to prevent the user to use a non-existent serial number.
My goal is to allow the user only choose the remaining available serial numbers, by removing from the drop-down list all the serial numbers already used.
By using the FILTER function, combined with MATCH and ISNA, I am able to create a column of available serial numbers (say, column C). The function used is:
=FILTER(A2:A;ISNA(MATCH(A2:A;B2:B;0))).
Then I moved the Data Validation list of column B (where the user must select the serial number used) from column A (all serial numbers) to column C (filtered serial numbers). I also added the "Reject input" in the Data Validation form, so I can allow the user only to enter a value listed in column C.
It works, but all the previously entered serial numbers on column B have a small red triangle showing that data is not valid. Of course, this happens because all entered values are removed from the data validation list.
I could simply ignore the red triangles, but I don't like this solution that much, because it always looks like there's an error on the sheet, and when we will have many data inside it would be difficult to distinguish this problem from any others.
Is there a different way to solve?
Thanks
with formula only you can use:
=TRANSPOSE(FILTER(A2:A, NOT(COUNTIF(C3:C4, A2:A)), A2:A<>""))
=TRANSPOSE(FILTER(A2:A, NOT(COUNTIF({C2; C4}, A2:A)), A2:A<>""))
=TRANSPOSE(FILTER(A2:A, NOT(COUNTIF(C2:C3, A2:A)), A2:A<>""))
then hide columns and use validation:
where this is the result:
demo sheet
update:
1st fx:
=TRANSPOSE(FILTER(A2:A, NOT(COUNTIF(C3:C4, A2:A)), A2:A<>""))
2nd and every next fx:
=TRANSPOSE(FILTER(A$2:A, NOT(COUNTIF({
INDIRECT("C2:C"&ROW()-1); INDIRECT("C"&ROW()+1&":C")}, A$2:A)), A$2:A<>""))

How to display only filtered data range in data validation rule in Google sheet

I have a table with two sheets. The first (Records) records the players from the form and a filter is performed here to determine the team (1 or 2 or 3) also.
The second table (Players) will perform calculations for individual players (one row for one player). In the first column, I will select a player using a dropdown. The problem is that all players are in the dropdown. I need the filtered ones (eg team 1 and 3). Can anyone help me? Thanks
Example sheet here
Update:
I'll apply a filter to the team first. E.g. 1 and 2 in the Records table.
Then select the winner in the Players sheet (from the filtered list 1 and 2), then select the loser from the same filtered list, but there will not be the player I just selected as the winner.
=SUBTOTAL(103; C2)
=FILTER(Records!D2:D; Records!F2:F=1)
demo spreadsheet
You may use a filter() function where you create a dynamic dropdown based on the team number you select. I have included an example where you can select a combo of a few team numbers together. If you choose only team 1 and leave the other two dropdowns blank (yellow), it will only show the names from team 1.
Dynamic Dropdown Sample

Create DropDowns that are based on which criteria are searched for

I am trying to allow the user to search on any of 4 criteria and have the rest of the 3 remaining field data validate based on the first search for selection.
I have four fields that I am trying to make dependent drop downs for the remaining 3 based on what you search for 1st. For example:
Scenario 1 - I search the data range validation for NAME and select a name in Cell L2.
I want the Phone, Email and Address to become dependent on the name was chosen (as there may be multiple records with the name of the person chosen).
I have accomplished this by using a secondary filter formula to filter address based on the name chosen and then applied data validation from the filter.
My problem is that I can't seem to figure out how to do the same thing if they pick the address first. Because my data validation is set on the filtered values and not the entire database. If they picked the address first, I want to validate based on ALL addresses and then filter-validate the NAME, PHONE and EMAIL.
I really just want them to be able to search whatever of the 4 criteria and then validate the other 3 on that result.
Any thoughts would help.
You can see my formula for filtering Addresses based on the Name selection in Cell S2 of the Customer Record Tab.
=if(L6="Address",filter('Sample Data'!$C:$C,'Sample Data'!$E:$E=L6),IF(L6="Phone",filter('Sample Data'!$C:$C,'Sample Data'!$D:$D=L3),IF(L6="Email",filter('Sample Data'!$C:$C,'Sample Data'!$J:$J=L4),L2)))
https://docs.google.com/spreadsheets/d/1E7adi88aEgvdV4ao8unbMHgZLEyu5CCRdTOjv8thjtc/edit#gid=1427488050
Select Name and only the Phones, Emails and Addresses for that selected name can be selected.
Select the Address and only the Names, Phones and Emails for that Address can be selected.
Same for Phone and for Email

I need an XPATH to extract data from www.gsmarena.com

I am doing a research about how mobile phones evolved over years so I need to create a database with specifications of as many phones is possible. I am trying to scrap data from GSM Arena website.
Example page: http://www.gsmarena.com/samsung_galaxy_note7-8082.php
I am using XPATH that contains the label that precedes each value, example //tr[contains (.,"Sensors")]/td[2]
But there are some values, last one in category, with no preceding label.
How do I pick this info:
Non-removable Li-Po 3500 mAh battery
or this ino:
Fast battery charging
Qi wireless charging (market dependent)
ANT+ support
S-Voice natural language commands and dictation
MP4/DivX/XviD/WMV/H.265 player
MP3/WAV/WMA/eAAC+/FLAC player
Photo/video editor
Document editor
Do note that different phones have different number of rows on page, so using [number] in XPATH would pick different info from
http://www.gsmarena.com/samsung_galaxy_note7-8082.php - need to pick 5th row of features
http://www.gsmarena.com/samsung_sgh_600-49.php - need to pick 8th row of features
To select rows without label in Battery section you have to use this xpath:
//tbody[.//th[contains(.,'Battery')]]//td[#class="ttl" and not(*)]/following-sibling::td
To select info from features use this
//tbody[.//th[contains(.,'Features')]]//td[#class="ttl" and not(*)]/following-sibling::td
To select Camera features
//tbody[.//th[contains(.,'Camera')]]//td[#class="ttl" and contains(.,'Features')]/following-sibling::td
To select Loudspeaker in Sound Category
//tbody[.//th[contains(.,'Sound')]]//td[#class="ttl" and contains(.,'Loudspeaker')]/following-sibling::td

Google Analytics - Unique events are not unique by Action name

I have Google Analytics (GA) event tracking set up. When I see "Top Events" report, why the "Unique Events" number do not match with number of rows displayed below. [see screen: click here ] These rows display one action name per row and the action names are all unique (I checked all 23 rows for unique action names). So total number of rows displayed should be equal to Unique Events number - isn't it?
Am I missing anything?
The unique event count for an action is the number of visits in which that action took place.
The total unique events in this report should equal the sum of unique events on all rows, not the number of rows. This is because a unique event is based on unique action-visit combinations, and each row has a different action.
In other words, if an action is repeated within a visit, the unique event count is not incremented, but otherwise it is.
So if one of the rows has 2 unique events that would mean that the event action was triggered in 2 separate visits, and both these visits would be included in the overall unique events.
In your example, the first 10 actions in your report only occurred for 1 visit each (they may even have all been the same visit - you can't tell from this report).
So I'm guessing that on the second page of your example there are two rows with 0 unique events, and the rest have 1 unique event - so that they add up to 21 unique events.

Resources