text
stringlengths
83
79.5k
H: Defining a range in a function with the value in a cell instead of a range I have the following table and I'm trying to write a formula that will take the value of column C and put it into the COUNTIF function where the ?? is. A B C Data Label Data Range Name ---------- ---------- ---------- Label#1 =countif(data!??,A1) A1:B Label#2 =countif(data!??,A2) C1:D Label#3 =countif(data!??,A3) E1:F I have hundreds of rows and dozens of columns and I'm trying to avoid manually update the target range for the COUNTIF. I've tried =countif(data!&C1,A1) and =countif(data!&"C1",A1) and =countif(data!C1,A1), but none work. AI: Use INDIRECT() to get a cell reference by a string, which in your case is coming from a cell. To use the range as defined in cell C2 but refer to a sheet called data, use: =countif(INDIRECT("data!"&C2, TRUE),A2) Hopefully I understand the final formula correctly. If not, replace the range reference with the INDIRECT() function. If this does not work, first check your formula with a manual entry of the range. If that works, there is a syntax issue with the INDIRECT() function so try putting =INDIRECT(C2, TRUE) in a cell and see what is returned to check that as well.
H: How to add a note (containing date) to a cell in column "X" when it is edited? See this thread: https://productforums.google.com/forum/#!category-topic/docs/how-do-i/_oFmvMZUCqg In particular this script: function onEdit(e){ // Set a comment on the edited cell to indicate when it was changed. var range = e.range; range.setNote('Last modified: ' + new Date()); } Also found here: https://developers.google.com/apps-script/guides/triggers/#onedit I'm looking to make this happen only for cells in a certain column, and not sure how to modify the script accordingly (or if I should take a different approach). AI: You can test the Column the edited cell is in and then act on the cell if it is in the appropriate column. So for Column C: function onEdit(e){ // Set a comment on the edited cell to indicate when it was changed. var range = e.range; var rangeCol = range.getColumn(); if(rangeCol === 3){ range.setNote('Last modified: ' + new Date()); } } .getColumn() returns the column number. Other options can be found at the documentation for the Range class.
H: Google sheet limit, number of sheets per workbook I know that Google sheets has a 2 million cell limit. https://support.google.com/drive/answer/37603?hl=en but was wondering is there a limit to the number of sheets? the old google sheet has this limit. https://www.quora.com/What-are-the-limits-of-Google-Sheets I can't seem to find any references on the limits for the new google sheet except that 2 million cell limit. AI: There is no reported limit outside the number of cells. There is a limit of 50000 characters in a cell, easily tested by trying to add more, so other limits may be found which are not listed. There are also limits inferred by taking the cell limit into account. Meaning 2 million 1 cell sheets, or 2 sheets at 1 million cells.
H: Using setBackgroundRGB() over setBackgroundColors() I have a GSheet that is using IMPORTRANGE() to import data from some other sheet. On this destination sheet I want to color each row based on the value of column A. Because the source dataset may have hundreds or thousands of rows I can't easily use conditional formatting for each column in the row so I use the example code below: function formatColor(event) { var sheet = SpreadsheetApp.openById("ID OF THE SHEET I WANT TO FORMAT"); var sheetCount = sheet.getSheets().length; // for each sheet for (var i = 0; i < sheetCount; i++) { var sheet = sheet.getSheets()[i]; var maxRows = sheet.getMaxRows(); var maxCols = sheet.getMaxColumns(); var colors = new Array(maxRows); var values = sheet.getRange(1,1,maxRows).getValues(); //for each row for (var j = 0; j < maxRows; j++) { //get th value of column 1 var range = sheet.getRange(j, 1); var value = values[j]; // make an array to hold the background color for each column colors[j] = new Array () // pick a color based on the value if (value == "Red") color = "Red"; else if (value == "Green"){ color = "Green"; } else if (value == "Blue") { color = "Blue"; } else color = "#ffffff"; // fill the array (column) with the selected color for (var c=0; c < maxCols ; c++){ colors[j].push(color) } } // in one command send the colors for each cell in the grid since // since setBackgroundColors() is an expensive call //deprecated, use setBackgroundRGB() sheet.getRange(1,1,maxRows,maxCols).setBackgroundColors(colors); } } Because this function can't be triggered by onEdit on onChange (due to the IMPORTRANGE()) I am using a Time-Driven event every minute to run the function. This works well enough, changing the background color of each row every minute based on the value of the first column entered in another sheet. However I keep getting the error: Method Range.setBackgroundColors is deprecated. Sometime ago I did some reasearch and I believe it said to use setBackgroundRGB() instead. The issue with using this function is there isn't a plural version setBackgroundRGBs() that would allow be to set all of the cells at once. If you would try and use this on a sheet with hundreds of cells to format it would take forever and likely error out. Am I missing something or is there some better way to do this. AI: As you (maybe) know, the fact that a method is "deprecated" does not mean it doesn't work - just that it might be removed in the future. So you're probably not getting an error, but a warning, and your code should work as intended. That being said, there is a replacement: It seems that setBackgroundColors has just been renamed to setBackgrounds, which it is know called in the documentation. I tried these two functions: function doesGiveWarning() { var range = SpreadsheetApp.getActiveSheet().getRange("A2:C2"); range.setBackgroundColors([["red", "white", "blue"]]); } function doesNotGiveWarning() { var range = SpreadsheetApp.getActiveSheet().getRange("A2:C2"); range.setBackgrounds([["red", "white", "blue"]]); } Running doesGiveWarning causes the script editor's lightbulb to turn on: ... and, clicking on it displays the warning, while doesNotGiveWarning runs without any warning. In both cases, the cells are filled with the colors I specify. However, you seem the be right, there is no plural version of setBackgroundRGB (yet). If you are willing to convert your RGB values to hex, you may still use setBackgrounds, as it accepts both CSS color names (red, white, blue) and hex values (#FF0000, #FFFFFF, #0000FF).
H: In CommCare, can you specify the order that choices from a Multiple Choice Lookup Table will appear in? (example: alphabetically by display value) I'm interested in two use cases: Re-ordering choices by a field uploaded in a look-up table Re-ordering choices by a case property in a list of cases specified by a Query Expression [when the "Custom Single and Multiple Answer Questions" feature preview is turned on] AI: For lookup tables The order of choices from a Multiple Choice Lookup Table are defined by the order that they are uploaded in. Therefore if you a column in your lookup table that looks like: Color ---- Blue Red Yellow The choices in the question will appear in that order. For a query expression XPath unfortunately does not let you specify the order in which your nodes are returned so the order is undefined, but most likely reflects the order that they exist in the database.
H: How can I deploy my Telegram bot codes on my Ubuntu server? I'm totally new to using VPS. Do I need to use SSH or FTP to deploy code files on it? AI: Either you deploy it via SSH or FTP it will work. Make sure you modify the permissions of the files. And you have required dependencies installed on server.
H: Why do some Twitch channels have one time subscription fees? Why do some channels such as Jesse Cox, Vlambeer, and Felicia Day offer one time subscriptions instead of monthly sub fees? Aren't Twitch subscriptions supposed to cost $4.99 per month? AI: When subscription buttons were first added, Twitch experimented by offering non-standard sub-options such as $2.99 subs and one-time subscriptions. While Twitch no longer offers one-time sub fees, partner channels that signed up were allowed to continue offering one-time subscriptions. It's worth noting that Twitch Prime subscriptions can be used for channels with one-time sub fees. You can still request a one time subscription for your channel by either requesting it through Emmett Shear personal twitch channel or requesting it directly to another high ranking twitch employee but you must have proven yourself to be a dedicated active streamer on the website with a large sized following. Your not guaranteed to acquire it as it's a feature the staff does not like to grant users since it hurts their profits but unless you ask for it they won't give it to you. List of channels with one-time subscriptions: Evo (Previously srkevo1) - $12.00 / One Time FeliciaDay - $4.99 / One Time RyonDay - $4.99 / One Time JesseCox (Previously shaboozey) - $2.99 / One Time Vlambeer - $12.99 / One Time
H: Time tracking with Google Spreadsheets I'm using Tasker and am trying to set up a profile that would track how many hours I spend at work. I've managed to set up the tracking part, which inserts the data in a Google Spreadsheet like this: Arrived 2017-03-11 10:15 Left 2017-03-11 12:40 Arrived 2017-03-11 13:00 Left 2017-03-11 15:50 Arrived 2017-03-11 17:30 Left 2017-03-11 21:20 What I'm wondering is: How can I add the final piece - counting the hours at my office, provided that I leave it several times per day. So for this example, the result is 9:05:00. I guess what I'm looking for is a loop, that would go trough each date, calculate differences, and add all of them into a cell. How would I go about doing this? AI: I made a simple version of your problem you can play around with: Make a copy of the sheet There are basically two things to do: 1. Get the duration for each visit For that I added a Column with an arrayforumla (so we don’t have to copy it in every row) that basically looks if we are in a “Leave” row and if so, gives us the time difference between the leave and the arrival before that. =ArrayFormula( IF( A2:A="Left"; TO_PURE_NUMBER(B2:B) - TO_PURE_NUMBER(B1:B); ) ) (expanded for better readability (Note: Your table needs to be well formated for that, meaning Leave and Arrival should always alternate) Now you already got the duration for each visit. Aggregate for each day To make this simpler, lets add a Col to our sheet, that figures out the day without time for each row. Like this: =ArrayFormula(IF(ISBLANK(B2:B);;INT(B2:B))) The important part is the INT(B2:B) which converts your datetime to a date Now I would recommend to create another sheet and automatically generate a day overview there, by simply putting a query in A1. =query( Log!A1:D; "select C, sum(D) where A = 'Left' group by C label C 'day', sum(D) 'total time'" ) That’s it! Here is the sheet.
H: How to discover which users have access to which Lookup Tables I have a lookup table in a project space that is not visible to all users. What is the best way to figure out which users have access to that lookup table? AI: Lookup Tables can either be assigned to groups or locations. All users that are in that group or location have access to that table. In order to find which groups and/or locations a Lookup Table is assigned to, you can view the table at this link: https://www.commcarehq.org/a/YOUR_DOMAIN/fixtures/view_lookup_tables/ Then look for a column called group 1 (or group 2, group N) or location 1 (or location 2, location N). The value in this column will tell you which group or location that that Lookup Table is accessible to.
H: What's a better way to check for the presence of a value across all rows? I have a table that, for 30 people, marks their dietary needs. The first 3 rows are diet category, the remainder are restrictions: ----------|Jane|Joe|Ali| Vegetarian| 1 | | | Vegan | | 1 | | Omnivore | | | 1 | No gluten | | | 1 | No nuts | | 1 | | Now I am trying to create lists of which restrictions are associated with which dietary type- the result will be, e.g: Vegan: No nuts Vegetarian: Omnivore: No gluten I've done this in a clumsy way by specifying a separate rule for every restriction- this prints the Column A value (name) of a restriction if there is any person who has that restriction and is also vegetarian: | Vegetarian | =if(SUM(FILTER(C2:AF2,NOT(ISBLANK(C5:AF5)))), A5 & " ", "")&if(SUM(FILTER(C2:AF2,NOT(ISBLANK(C6:AF6)))), A6 & " ", "")&if(SUM(FILTER(C2:AF2,NOT(ISBLANK(C7:AF7)))), A7 & " ", "") | Vegan | =if(SUM(FILTER(C3:AF3,NOT(ISBLANK(C5:AF5)))), A5 & " ", "")&if(SUM(FILTER(C3:AF3,NOT(ISBLANK(C6:AF6)))), A6 & " ", "")&if(SUM(FILTER(C3:AF3,NOT(ISBLANK(C7:AF7)))), A7 & " ", "") Considering that the only difference for all the rules in the vegetarian food restrictions count is the column number, I'm sure there's a more effective way to do this, but I haven't worked it out. In pseudocode, what I'm looking for is something like this: A3..A5.for_each do |row_num| if(SUM(FILTER(C2:AF2,NOT(ISBLANK(Crow_num:AFrow_num)))), Arow_num & " ", "") end AI: I think the following does the job: =join(", ", filter(A$6:A$10, mmult(N(C$6:AF$10), N(transpose(C2:AF2))))) The key part is matrix multiplication. Multiplying the array of preferences by the transpose of the row such as C2:AF2 results is nonzero elements corresponding to the rows where there is an overlap with C2:AF2. Then the column with the names of restrictions is filtered by the result of multiplication, and the results joined, separated by comma-space. The N() function performs conversion of blank cells to zeros, otherwise mmult complains about non-numeric numbers. The formula uses absolute row references for 6-10 which in my example are the rows with restrictions. The reference to row 2 (vegetarian) is relative. So, copy-pasting this formula down the column will result in correct answers for other diets.
H: Construct query where condition is in the past week? Using Google Sheets' =QUERY function, is it possible to construct a select such as follows? =QUERY('My Sheet'!B:D,"select A where C = In the Past Week") AI: I'll give answers for two version of the question. Within the last 7 days "select A where C > date '" & text(today()-7, "yyyy-mm-dd") & "' and C <= date '" & text(today(), "yyyy-mm-dd") & "'" For example, today this would result in the query string select A where C > date '2017-03-07' and C <= date '2017-03-14' However, with filter the same result is achieved without a messy syntax: =filter(A:A, C:C > today()-7, C:C <= today()) Within a given week On way is to use the built-in function weeknum for this purpose. It has to be applied before query runs, as spreadsheet functions are not a part of query syntax. =arrayformula(query({A2:C, weeknum(C2:C)}, "select Col1 where Col4 = " & weeknum(today()))) Here, {A2:C, weeknum(C2:C)} is an array with 4 columns, the last one being the week number of the data in column C. The query selects column 1 (A) where column 4 matches today's week number. Notice that references Col1, Col2, etc are used when querying an array constructed with {}. The formula may have issues around New Year Day (when a week is split between years) but with any luck you'll be on vacation then... Again, the filter approach is easier: =filter(A2:A, weeknum(C2:C) = weeknum(today()))
H: Is one person allowed multiple Google accounts? Is it allowed for an individual to register and use two separate Google Accounts? I know it's possible seeing that the same phone number can sometimes be used to register a new account, but is it allowed? I am consider doing this for organizational purposes but am wondering would I get banned? AI: It is certainly possible - I have multiple. I have not found any mention of Google limiting the number of accounts you can create, in fact, Google's documentation mentions ways to sign in to multiple accounts at once. But if you're doing this for "organizational purposes", there are probably better ways to achieve your goal. Using multiple accounts will require some changes to how you are using your browser, for example. You cannot easily browse two Gmail inboxes in the same browser window.
H: What is the case and data behavior when I deactivate a mobile user in CommCare? I see you can delete data and cases if you delete a mobile worker. But if I just deactivate a mobile worker, what happens to the data and cases associated with that mobile worker? If I need cases to be taken over by a new mobile worker, should I reassign before deactivating the old mobile worker? AI: When you deactivate a mobile user all the forms and cases created by that user remain intact and unaffected. If there are cases owned by the mobile worker being deactivated that require further follow up then yes, you should re-assign them to another user. You can do this at any time (before or after deactivating the user).
H: Are case types case sensitive in CommCare? If one of my case types is named case and one of my case types is named Case will they be treated as different case types in CommCare? AI: CommCare doesn't provide any specification about case-specificity in its underlying technical format, so the safest guaranteed behavior is to make is that the case types need to match, but to not make any assumptions that two cases with mixed cases won't match.
H: How did this strange secondary Gmail account get created? I've received an automated mail saying "my" new e-mail address was created. My e-mail is example@gmail.com, and the message says the new address is something like exampleabc@gmail.com. I immediately changed the password and went through the security check. I also checked the latest activity. I saw something strange: Authorized app (427071021612.apps.googleusercontent.com) Hide details OAuth domain name: 427071021612.apps.googleusercontent.com Manage account access Why did this happen? Did I get hacked? AI: It would seem that more than likely someone created a new Gmail (Google) account and listed your email address as the account recovery email address. Why? Who knows. Error. Prank. Plain stupidity. Take your pick. Your account is fine; this is little more than an inconvenience and, honestly, poor security on their part. Now you have a gateway to take over their account. Another possibility is that this is a phishing message to try to get you to log into a bogus site and give up your credentials. As long as your practicing good security to keep your Google account secure you should be fine. At the very least, be sure to use 2-step authentication.
H: How to create a Google+ page for my website? How can I create a page in Google+ for my website? I want it to have a URL like plus.google.com/+MyWebsiteName. AI: Sign in to your regular G+ account. At the bottom of the left panel, click Google+ for your brand. On the following screen, click Create Google+ Page. Create your Brand Account. On the following screen, under Enable Google+ for your brand, click Enable. (source) In order to get a custom URL, you need to satisfy some criteria first: Have ten or more followers (people who have added you to their circles) Account is at least 30 days old and in good standing Profile has a profile photo If you meet the criteria, then you'll see a banner at the top of the screen when signed in to your G+ Brand page. Important: You can’t change your custom URL after you create it, so be sure you like yours before you finalize it. (source)
H: Can I list the parent_name of a child case in the child case module case list? I have a module of child cases (type = alert) of a parent case and I would like to NOT have the user select the parent case first, but simply see a list of all the alert subcases. However, I do want to display the parent_name of the child case alert in this list. Is it possible to list the parent_name property as a property in the case list? AI: Yes, you can use parent/name for this.
H: Unsubscribing from Crunchyroll Premium guest pass emails As a member of Crunchyroll Premium, users are occasionally sent free guest passes for Crunchyroll premium. Despite repeatedly clicking "unsubscribe", Crunchyroll still sends these emails every few months. Even unsubscribing from all Crunchyroll emails has had no effect. Is there any way to get Crunchyroll to stop sending emails about guest passes? AI: One possible workaround is to create an email filter to archive any message from "@crunchyroll.com" with the subject line "Gift Your Crunchyroll Premium+ Guest Pass". It won't stop the emails being sent, but it should keep them out of your inbox.
H: How to set the delay time for Google presentation slides without publishing it? I created a long Google presentation slideshow with pictures. I am able to change the transition speed, but when starting the presentation and clicking the play button, the delay for each slide is much too short. I can't believe there is no setting for that. Where is it? The only official solution I could find is publishing the slideshow on the web for everyone. There you can choose the delay. But I don't want to publish it, it's just for my own use. I assume that when I don't give the published link to anyone else, it's safe, but it makes no sense to me. AI: When publishing the presentation, you can see that a parameter delayms is added to the URL, with the time you selected, in milliseconds. I just tried an idea and it also works with non-published presentations! Take the URL from edit mode, replace everything from /edit with /present?delayms=8000 and you get what you wanted.
H: Only seeing "--" in my case history export tab I have a case property that is updated by two forms in my app. I tried to create a case export that included row #, the caseid, and the case property I'd like to see the history of. When I include the row and case property in the case export, all I see are "--" in the history tab, which I did not expect since most cases have a value (and I would expect a history of the value being updated by the two forms that update the property for at least a few of the cases). AI: In general, the --- in an export means that that value is missing. As in CommCare never found it in the form or case. This is in contrast to a blank, which means that CommCare found the value, but it was blank or empty.
H: How to remove the extra indent on list after the 10th item in Google Docs I want to remove the extra indentation that appears on a list after the 10th item: 8. This is a line 9. This is a long line that gets wrapped to the next line because it has a lot of characters 10. This is a line that gets wrapped too, but has a weird indentation at the beginning. I want them to have all the same indentation, like this: 9. This is a line 10. This is a long line that gets wrapped but now it has the same indentation as the line before AI: You'll need to move the left indent over a bit so that the two-digit numbers don't overflow. Do you notice in the ruler, the small rectangle and the down-pointing triangle? Those define the "First Line Indent" and the "Left Indent". If the number is too wide, it forces the indent to jump to the next default tab stop. You need to move them further apart. Highlight all the text you want this to happen to (otherwise it'll only work on the line where the cursor is) and drag the triangle to the right. That'll also move the rectangle, so drag the rectangle back to where you wanted it. There will be guide lines so you can line it up with existing text. As you can see, it handles multi-line items just fine.
H: Does function order of operations in CommCare HQ affect efficiency of execution on the mobile device? I have a caselist filter that is taking a long time to execute and am wondering if I can do anything with the if/and/or <= >= statements to help things run more efficiently ("faster"). The formula is essenstially: ((((today() - resident_under2_dob) > 6) and ((today() - resident_under2_dob) < 46) and (hhcl1_satisfied != '1')) or ((((today() - resident_under2_dob) div 30.25) > 6) and (((today() - resident_under2_dob) div 30.25) < 9) and (hhcl2_satisfied != '1')) or ((((today() - resident_under2_dob) div 30.25) > 24) and (((today() - resident_under2_dob) div 30.25) < 27) and (hhcl3_satisfied != '1')) or ((((today() - estimated_dob) div 30.25) > 24) and (((today() - estimated_dob) div 30.25) < 27) and (hhcl3_satisfied != '1'))) ) There's actually an additional 'and' but it references an instance, so I want to ask that in a seperate question so we don't cross the streams. AI: (answer and big caveat from another source) 1) an equation in the "wrong" side of an 'if' statement will not be entered 2) the second half of an 'and' statement will not be executed if the first test was false 3) the second half of an 'or' statement will not be executed if the first test was true. However, it may not help anyway, for reasons laid out here: When we parse a form, we break down XPath Calculations/Relevancies/etc into what we call a set of Triggerrables. These triggerables are an XPath Expression (IE: "if(/data/do_calculates, complex_xpath, '')") which has some outcome on a set of targets (IE: /data/myval = the outcome). Each of which is a single expression with multiple "Targets". If two questions have the same relevancy expression, they share one triggerable We then go through all of the expressions in our triggerables and find their triggers , so any path where a change which would result in a change in the outcome of the triggerable. Note that each of these triggers can be in a "floating context". So if you take the expression: instance('casedb')/casedb/case[@case_id = instance('mylocations')/locations/location[@id = current()/../@repeat_id]/@parent_id]/last_visited_by That expression is triggered by whichever nodes are relevant to whatever its current()/../@repeat_id evaluates to, which might change if it is re-used, so we need to keep track of a lot of information about the full context of what expressions trigger an update, not just, say, "/data/myvalue" Finally, we make a run where we build a graph of dependencies between the triggers, and we build a final ordering of which triggerables being executed in which orders will ensure that we touch every triggerable if needed, without going in the wrong order. So when we change a value, we: First walk the graph identifying all recursive dependencies which might be triggered by the change. IE: /data/a might update Triggers "1, 3, and 10, and each of them might update 2, 11, and 5" Now we've collected a comprehensive list of the triggers that might update. At this point, these are context free, because we can't know until evaluation which specific instance of element_2 is going to be triggered by /data/element_2[@id = /data/element_1[id = #form_something]/id/value until we've already done the element_1 eval, we just know that it might, that means we can't test whether element_2 has changed since the last eval), Finally we do one pass through our canonical list of triggerables (Which is much larger in the form where they aren't blank) and we have to actually prod the triggerable and see if the trigger meets its pattern. If so, we actually run the triggerable expression.
H: How do I adjust the format of data displayed in the CommCare report builder table I'm trying to configure a report builder table to display non-numeric values for case properties. For every case property I add to the table, the only "format" I see displayed is sum, average, and count per choice. Is it possible to have the report builder table display non-numeric format data for case properties? AI: If you want to simply display the case properties, you must create a list report, which is not aggregated. If you are creating an aggregated report (data table type or worker report type), you must chose a way that the values will be aggregated. Since "sum" and "average" are undefined for strings (non-numeric data), you should choose count-per-choice, which will display one column per value, and a count of how many times that value appeared in the corresponding cell. Suppose your cases looked like this: +---------|----------|-------------+ | Patient | district | test_result | +---------|----------|-------------+ | Joe | North | positive | | Bob | North | positive | | Fred | South | negative | +---------|----------|-------------+ If your report was aggregated by district, and you included test_result in your report with a "count per choice" format, then you would get a report that looks like this: +----------|----------------------|----------------------+ | district | test_result-positive | test_result-negative | +----------|----------------------|----------------------+ | North | 2 | 0 | | South | 0 | 1 | +----------|----------------------|----------------------+
H: Multi-language support for Multiple Choice Lookup Table questions Is it possible to specify multiple languages for the "Display Text Field" portion of a select option in a multiple choice lookup table question? Note, I'm speaking specifically about the "Choice" definition, not the label for the question itself which does support multi-language already. AI: You can use an attribute in the lookup table and a bit of a hack to get the current app locale ID to accomplish this. There's a writeup on it here that covers it pretty well: https://confluence.dimagi.com/display/commcarepublic/Using+Lookup+Tables+with+Multiple+Languages
H: Other user's icon appeared in Google Sheets, no explanation When I mouse over the A, first I see a tooltip showing my coworker's full name "Abel Jones" (for example), and then a larger pop out showing his full name and presumably the default Google+ profile image. I just want to know what Google Sheets is trying to tell me. Why did he suddenly appear there? Hint: I recently asked him to go to Tools/Notifications Rules and make it so he is notified when I make changes. Is his "A" icon telling me that he succeeded? AI: That means that other users had opened the file while you have opened it and that you could chat using the Google Docs editor built-in chat tool. For further details see Chat with others in a file
H: Can Google Sheet's =AVERAGE function count multiple values only once? In Google Sheets, is it possible to count multiple values inside the =AVERAGE function only once? Example: =AVERAGE(32.3,48.9,33.2,48.9,33.5,49,33.8,49,33.5,48.5,48.8,33.9) Count 33.5 only once. AI: You can use =UNIQUE for this, to remove duplicate values from a list of numbers. Note that =UNIQUE takes an array as parameter, not a list of numbers, so we need to wrap your list of numbers in {}: =UNIQUE({32.3; 48.9; 33.2; 48.9; 33.5; 49; 33.8; 49; 33.5; 48.5; 48.8; 33.9}) This gives you a list of 9 elements - the duplicates have been removed: 32.3, 48.9, 33.2, 33.5, 49, 33.8, 48.5, 48.8, 33.9 Knowing this, we can combine the two formulas: =AVERAGE(UNIQUE({32.3; 48.9; 33.2; 48.9; 33.5; 49; 33.8; 49; 33.5; 48.5; 48.8; 33.9})) which gives the expected result of 40.21111111. I have created a spreadsheet to demonstrate this, feel free to copy it. And see the documentation for =UNIQUE, =AVERAGE and Using arrays in Google Sheets.
H: When did GAFE (Google Apps for Education) become G Suite? When did GAFE (Google Apps for Education) become G Suite? AI: Google Apps was renamed G Suite on September 26, 2016. G Suite for Education was introduced on October 4, 2016.
H: Is it possible to add icons to individual reports in a report module in CommCare? I would like to add icons to individual reports in a reports module in CommCare. Is it possible to add icons to individual reports within a report module? AI: That is not possible at this time
H: Display the owner of a case in the case list Although there is already a question regarding how to display a location name in a case list (Displaying location name from organizations lookup table in case list/case detalis), I have a lightly differently nuanced question regarding a similar output. In an app with a supervisor >> CHW location hierarchy where only the CHW locations can own cases (supervisors can view cases but not own them), in a form that updates a case, if certain questions are answered a specific way, an alert is created and I want to create child cases for a supervisor module. In the case list of that module for the child cases being created (the "alert" case types), I want to display the location name that owns the case. In the form creating the child cases, I save the owner_id of the owner of the parent case as a property for the child case. How do I reference that in the case list for the child case "alert" module? And is it going to be the "name" of the location or the alphanumeric location_id? Ideally I would like to reference the name of the location because they are saved as the name of the CHW whose mobile user is assigned to that location. AI: In your caselist use a calculate format to refer to: instance('locations')/locations/location[@id = current()/@owner_id]/name If you're using the older hierarchical location structures you'll need to customize it, something like: instance('locations')/toplocations/toplocation/secondlevels/secondlevel[@id = current()/@owner_id]/name
H: Are there any crucial risks to allowing mobile users sign in with the same username and password to collect data in CommCare? I want to allow 8 different mobile workers to access the same CommCare application on their phones and submit data to the same forms. We are not using user as a case. Is there any reason we shouldn't allow mobile workers to collect data using the same username and password? Are there any risks we should be aware of? AI: There are some assumptions that get made about the locality of a user to a single device. If the same user logs into multiple devices there are some edge cases where they won't see updated data that was changed on one of the other devices. This is because the server tries to optimize what data get's synced to a user and assumes that any changes made by the user don't need to be re-synced to the device (since they're already on the device). There may be other side effects but in general it's not something that is well tested or supported.
H: What are my options for getting around the 100,000 maximum row limit for case export? My project data doesn't easily lend itself to filters that will bring the row count under 100,000 for case export. What are my options to get around this issue? Are there ways download case data without going through the "export case" interface? AI: For now the best way to get around this is to use filters. Date Range - You can use date ranges to select smaller chunks of data. These dates are based on the last time the case was modified (see Does the date filter for a CommCare case export filter forms by last modified date or opened date?) Use reporting groups - You can further break down your case data by only downloading cases for a set of users, groups, or organizations. (For example, if your cases are evenly distributed amongst your users, you can put them in two separate groups which will halve the number of rows downloaded). If all of that still doesn't work for you, and you have technical capacity, you can look into using the commcare-export tool
H: Filling a column with a formula that references correct row without dragging down In Google Sheets, I am trying to create a formula that will automatically apply to every cell in a column. The formula refers to another column of cells in a 1:1 way, that is S3 should refer to B3, and S4 should refer to B4, so on. If I use the lower-right corner of the formula containing cell to drag down, this works correctly. The formula that fills in is unique for each cell down the column. Great! But...I want this to be automatic. This Sheet is not user facing and should never require direct manual manipulation. If I fill in, say, 1000 cells, someday that will still run out so that isn't a real solution. I know it is possible to use ArrayFormula to do what I want, but there is another side effect. ArrayFormula only applies the static reference in the first cell and duplicates that for every cell on the way down, instead of updating the reference on a cell by cell basis. Here is my current, non-sufficient formula placed in S3: =ArrayFormula(if(B3:B<>"", ArrayFormula(VLOOKUP(B3,IMPORTRANGE("[A Sheet URL]","B4:M"),{2,3,4,5,6,7,8,9,10,11,12},FALSE)),"")) The important part that isn't working is the first argument for VLOOKUP, which is always B3 for every cell all the way down the column. AI: Replace B3 from the first argument of VLOOKUP by FILTER(B3:B,LEN(B3:B)). It's worth to say that there are several examples on this site about using VLOOKUP with an array as the first argument. Question with a similar answer: Google Sheet - Summarize the best options in another table About other kind of problem: Google sheets VLOOKUP issues not finding a value thats is in its range Without answer at this time: VLOOKUP within VLOOKUP returning multiple results
H: What do I need to "fix" for a case property highlighted yellow with a exclamation point warning? I have a module which modifies case_type household_member. There are three forms, in two of them #case/resident_name is shown in the left hand menu and upper blue banner as "resident_name" in a gray box (as expected) however in one of them, the same code #case/resident_name is highlighted in yellow rather than gray and prefixed with an "alert triangle." Of note, in all three forms, the standard gray box appears in the actual form-builder window (e.g. in the display text and display condition boxes). Since this is an active project and case_property issues could affect a LOT of data, I just want to make sure this "yellow warning" isn't something I need to make a priority fix. AI: The yellow warning box means that CommCare hasn't detected that your application has saved that case property before. It should still reference the case property when you deploy your application so if the property exists in the case everything will work correctly. It should also have the same behavior in all forms in your application. Some helpful debugging tips would be: check that you've spelled the property name correctly check that all forms are modifying the same case type
H: Can I delete my Google Photos folder from my Google Drive? I enabled and then later disabled the feature to show a Google Photos folder inside my Google Drive. I decided to just use the Google Photos app directly, so I no longer want to see this folder. But, it seems to have left the folder behind in my Google Drive. This is days later, so I'm not sure if it's still "working on it." Is this safe to delete? AI: You already have disabled the feature to show Google Photos folder inside my Google Drive. Now you can delete Google Photos folder from the Drive. It is safe. It will not delete photos from Google Photos. Source: Self tested.
H: Will my friends receive an explicit notification if I like a photo? I wanted to like all the photos of a girl, but I don't want my friends on Facebook to know I have done that. Will my friends be notified of these likes explicitly on the first page/main activity when they visit the Facebook website or app? AI: No, your friends (except those whose photo/status you are liking) will not receive any notification. But all those friends who have marked your profile as first, they will see your almost every activity on their Timeline and those who are following might not see everything, but yes they will also see most of the things on their Timeline.
H: How do you get Google Trends to go back before 2004? How do you get Google Trends to go back to a year in the distant past, for instance 1900? It seems to not go back before 2004 now. I remember using a Google feature that showed a graph of how common certain search terms were, by year, and I recall it going back quite far. I've seen the following picture I guess perhaps it's from Google. When I look for the feature, I see a thing called Google Trends, but it doesn't go back before 2004. So it's not clear to me whether the thing I'm looking for is another Google service (perhaps discontinued by Google?), or if Google have crippled their Trends service. Or if there's some fiddly thing in their new GUI, that I'm not aware of, that makes it possible to go back before 2004. Regarding any answer, if it's to tell me that Google Trends doesn't, then I'd like to know what service it was that did. I think it was a Google service. AI: I think you are perhaps conflating the functionality of Google Trends with the Google Ngram Viewer. It's possible that they were connected together at some point, but the two are definitely separate products now.
H: Gmail ID with minus sign within username Recently one of developer of my team had an Google email as developer-his.user.name@gmail.com while I know about sub-addressing as his.user.name+label@gmail.com What is that called and how is that important? Update: I have read Google docs and I could search about + sign in the ID, which is being used for filtering purpose. Where can I find more about dash. AI: Google does not allow dashes in new email addresses, but they might have in the past as @ale said. Either way, it is not like the . or + characters and is a permanent part of the address. For example, if my email address is testemail@gmail.com, you can't send an email to test-email@gmail.com and have it arrive in my inbox. The opposite is also true. So, developer-his.user.name@gmail.com is the email that person signed up with and you can't send an email to him by using his.user.name@gmail.com.
H: How do I find the closest match in a CommCare Lookup Table? Is it possible to lookup the closest value (equal or less than) to a particular question using a Lookup Table in CommCare? Example: My table has values 5, 6.35, 42.8, 136. I want an input of 6 to return 5, 6.35 to return 6.35, 48 to return 42.8, and 135 to return 42.8. AI: I believe you can use <= in a filter in combination with max to achieve this affect. The xpath might look something like this max(instance('myentrys')/myentry_list/myentry[value <= target_value]/value) That will give you the maximum value less than target_value. If what you wanted was the entire row in the table that has that value, you can then do a lookup on that value—i.e. find the row that has the value that is the maximum value less than target_value: instance('myentrys')/myentry_list/myentry/value[value = max(instance('myentrys')/myentry_list/myentry[value <= target_value]/value)]
H: How to get shared likes on the main page posts itself? I am having about 70-80% likes on my shared posts but they don't have effect on my main page. I usually share my page on groups and share with friends and whenever I get likes on the shared posts there is no effect on the main post in my Page. Is there any way so that likes on my shared post to my main post on a Facebook page ? AI: No, there is no way to do so. When you share a post from any account, or into any group, it is considered as a new post. So all the Likes, Comments are associated only to the shared posts. You cannot get it on main Page posts.
H: Get total parent-cases with at least one sub-case with a particular value I'm trying to get a count of parent-cases that have at least one subcase with a particular value. Parent case_type is "foo" and sub case case_type is "bar". Each case_type "bar" has a variable "degrees" I need the count of all "foo" with at least one "bar" where degrees < 100 I do not want to double-count a "foo" if it has multiple "bar" that meet the degrees requirement. I expect a high count (2,000+) of case_type foo per device There could be from 0 to 10+ case_type bar per foo I'm currently attempting this in a form that edits cases case_type bar I've attempted to do this with a casedb bar "count" inside a foo "count" but I couldn't figure out how to phrase the interior casedb parent @case_ID reference. I wonder if this could be done with a nested repeat group, but I'm confused by the fact that the number of "bar" per "foo" is dynamic. Before I invest significant more time in this I'm wondering if anyone has done something similar and what your solution looked like. AI: Create a repeat group with model iteration over the foo casetype. The model iteration ID query would be: instance('casedb')/casedb/case[@case_type = "foo"][@status = 'open']/@case_id This will create one repeat per foo case. Inside the repeat group, you'd have a count of the number of bar cases are under the current foo case: if(count(instance('casedb')/casedb/case[@case_type = "bar"][@status = 'open'] [index/parent = current()/../@id][degrees < 100]) > 0, 1, 0) This returns 1 if there are any bar cases under that foo case with degrees < 100. Then outside of the repeat group, you can sum the above calculation over all the foo cases to get your total: sum(/data/repeat_group/has_bar_case) I don't know about the performance of this solution with the case load you have. You probably have to load test it.
H: SUM a variable number of Rows between two points How can I SUM a variable number of Rows, where the start and end points will be changing constantly? In the image below I would like to be able to add all the values for each choice together. However there may be rows added in as needed(As you can see Wednesday has more rows than Thursday). If possible I'd also like to be able to show how many bookings there were for that day using a variation of the below formula: =CONCATENATE(COUNTA(B2:B13), " Bookings") Example Sheet AI: I think I've come up with something (Whenever I post a question I seem to instantly come up with my own solution!). Using the following: =SUM(D$19:INDIRECT(ADDRESS(ROW()-1,COLUMN()))) I can add as many rows as I want between the start and end points and it will SUM correctly. The D$19 will update itself to whatever that cell becomes(D$20, D$21, D$22, etc). The INDIRECT(ADDRESS(ROW()-1,COLUMN())) will always get the cell above itself, so it will SUM everything above itself. Is there a better way to do this? I know that the only problem I have right now is if a row is added before 10:00am it will not be counted in the formula.
H: How can I skip columns in a Google Spreadsheets Chart? I have a table of data in a Google spreadsheet that we want to use to create multiple charts. The issue we are facing is that some of these charts omit certain columns. We don't want to remake the table multiple times. Example: Row 1 = Labels for Items 1, 2 and 3 Column A = Dates Column B = Item 1 Column C = Item 2 Column D = Item 3 Items are in a specific order and the order cannot be changed. (Actual data has more columns than this and reordering it to satisfy all required charts would be impossible to do within the same table.) Charts Data range for a chart with all the data: Sheet1!A1:D5 Data range for a chart with Item 1 & 2 only: Sheet1!A1:D4 Data range for a chart with Item 2 & 3 only: ???? It is situation 3. where we are having difficultly, since we need column A for the dates and column C & D for the values, but need to skip column B. Is there a way to ignore specific columns within a dataset? What is the proper reference to use in this situation? AI: In the chart's menu, go to Advanced Edit..., then in the Chart types tab you can enter the range. If you need to skip some columns, enter 2 ranges separated by a comma, one to left of the column you need to skip, and one to the right. This is how it looks like in a chart I maintain - skipping columns E to G and M to O: C15:D948, H15:L948, N15:P948
H: Can the deviceID in a CommCare form submission be used to trace details about the submitting device? When looking at a form submission on CommCareHQ, the Form Metadata includes a field called deviceID. Can this field be used to find additional information about the device, such as model number, serial number, etc.? If so, how? AI: You may be able to use online tools to lookup the deviceID/IMEI number. One tool that I found was: http://www.imei.info/. Enter the deviceID and you should see the phone specs.
H: Check another column to determine the kind of calculation to perform I have a spread sheet which, among other things, has a table with a row that specifies the type of problem (put in numbers 0 to 4, according to a reference table) that occurred, and the column next to it says how long it took to be solved. The things is, the problems are not sorted by type, so I can't perform a regular SUM, MEDIAN, etc... on a range. It looks something like this: Problem type | Time taken 0 | 143 3 | 123 2 | 987 0 | 431 And so on. The options I see are either composing 5 new tables by error type, or make = function IF (*totalSumRange*; "cellToTheLeft == errorTypeNumber") kind of statements, but I apparently can't specify such things within the arguments. AI: You can use AVERAGEIF in Google Sheets, per below. (Similarly for SUMIF.) You can either specify the exact range, as above (A$2:A$8), or generalise the parameters to A:A, D2, B:B. I prefer the latter as the formula doesn't need to be updated when new entries are added to columns A and B. However, this assumes there is no other data further down in columns A and B. For reference, from Google Docs Editors Help: AVERAGEIF(criteria_range, criterion, [average_range]) criteria_range - The range to check against criterion. criterion - The pattern or test to apply to criteria_range. Equals: "text" or 1 or "=text" or "=1" Greater than: ">1" Greater than or equal to: ">=1" Less than: "<1" Less than or equal to: "<=1" Not equal to: "<>1" or "<>text" average_range - [ OPTIONAL ] - The range to average. If not included, criteria_range is used for the average instead.
H: Saving child form information to parent case I have a form that is in a module for a child case (individual), but I want to be able to save a calculation that happens in the form to the parent case (household). Is there a way to save this property/informatoin in this individual-case form to the household-case? AI: Yes, you can save the particular question from a child case form that you wish to save as the property to the parent case by typing "parent/[property name]" in the case management settings page of the child case form. See the "Accessing Parent Case Properties" on the CommCare help wiki (link here: https://wiki.commcarehq.org/display/commcarepublic/Child+Cases).
H: what is the syntax to reference form data in a model iteration query? Per this answer: Is it possible to use a repeat group to iterate over a space-separated list? one can reference user input to control a model iteration. That being the case, if my question ID is spaced_list then what should be the syntax in the three windows of a model iteration form interface: Query Expression Instance ID Instance URI I've tried using 'instance('commcaresession')/session/data/spaced_list commcaresession jr://instance/commcaresession but for some reason it automatically replaces "commcaresession" with "commcaression-1" AI: So the key thing with model iteration is that the model to iterate over has to be set when the form is opened. You cannot use any questions internal to the form in an iteration expression. You could still probably iterate over a space-separated list loaded from a case property. Either way, it might make more sense to just use a regular repeat group without model iteration. You can make the repeat count equal to the number of words in your space-separated list and then load the n-th word into each repeat.
H: Facebook Messages Never Delivered I'll try to give all the details as best as possible: As a side note, I have had an account since '08, but was inactive for several years. I last messaged someone on the old system 4/5 years ago. I log in to find the new messenger system put in place. AFAIK on the desktop website the new messenger didn't affect how you send messages, other than the notification doesn't seem to be showing sometimes. I sent a message to someone I'm friends with using the website through a desktop browser. The friend does not have the messenger app on the phone (or least it says they don't when I installed the app on my phone). I had installed it after sending the original message, but wouldn't think this has anything to do with it. I've seen the friend be "active" according to FB and have a something like "1h ago" when I check if they responded on the messenger app I installed on my phone. It's been over a week and the message was still showing the "Sent" icon (Non-filled in check mark), but never shows the "Delivered" icon (Filled in check mark) I've sent another message which also didn't get delivered (I've stopped at this point, because I figure if the friend ever receives them they will get spammed with a bunch if I send any more). Other Notes: I have sent messages both on the desktop website and on messenger to both old friends (like the one above) and new friends I've added since with no issue. They are noted on messenger as sent, delivered, and seen with no issue and show a check mark on the desktop website with "seen". I'm not blocked by the friend otherwise it should have given me a message. I don't feel the friend would be using a "message read" masking app considering they don't even have messenger installed. Is there something I'm missing or does this sound like a problem on FB's end? AI: As you mentioned. Everything is fine, in your case I would think the problem as follows. Your friend must be using some "read receipt blocker". Or On client side read receipt js might is blocked. Or May be some sever error (very rare.)
H: Increment Cell Reference in Formula by 10 I have a spreadsheet that will have values every 10 rows. I'd like to make reference to them but I'm having trouble doing this by clicking and dragging the corner handle to fill out the cells. If I fill a cell with ='Sheet Name'!A$2 and the one below with ='Sheet Name'!A$12 I would expect to be able to select both, and use the corner handle to drag it down and the formula would increase by 10 every row. This is not happening. Instead I get the same two rows repeated. Is it possible to increase the value of a formula when dragging it down? If not is there an alternative way of doing this? Edit Here's an example spreadsheet. I've had to make some changes, now the source cells may move down as users insert rows. So the cells might not be 10 rows apart, they could be more or less. AI: On Locking Ranges using "$" The first problem I see is the $ sign is placed before the row. This tells the spreadsheet that it needs to LOCK that row (2 & 12) from changing numbers. The drag-handle operation relies on gsheets to find a pattern in your selection and repeat or continue it. If it doesn't find a pattern it repeats the elements you have selected. I tried what you were doing but with the dollar sign locking the column instead and Gsheets does not skip every 10 rows so I believe the handle-drag-operation just won't work for what you are trying to accomplish. The following only applies if there are exactly 10 rows difference between each reference ( I do NOT recommend this approach ) If you want to use the handle-drag operation try this: =INDIRECT("Sheet4!$A"&(ROW(A1)*10-10+2)) & in the cell directly beneath that one: =INDIRECT("Sheet4!$A"&(ROW(A2)*10-10+2)) Select both of those cells and drag downwards. It will give you the desired effect. Keep only one set of Headers in Row-1 if you plan on doing Maths! Although your spreadsheet is pleasing to look at it is not in a typical TABLE format. A better way to list your data is to have only one Header where the fields listed are: DATE, Booking-Time, Description Of Booking (leave blank if none), Choice 1, Choice 2, Choice 3, Price. Every Row after row one should be an instance of what your headers are describing ( in this case bookings ) where each field/Column defines the characteristics of that instance. Here is a break down of the choices I made with your data: The "Daily Totals" sheet should have 6 total columns/Fields: Date, Choice 1 Daily Sum, Choice 2 Daily Sum, Choice 3 daily Sum, Total Daily Sum, # of Bookings that day. In "Daily Totals" Cell A1 you can have the Formula =UNIQUE(Source!A2:A); replace A2:A with where your date column/Field is in sheet "Source" In "Choice 1 Daily Sum" I used the formula =SUM(FILTER(Source!D:D,$A2=Source!$A:$A)) ; Where D:D is the Choice1 column in sheet "Source", $A2 is the date column in sheet "Daily Totals," and $A:$A is the Date column in "Source" This formula can be copied down for each row corresponding to a new date, and right for each Column/Field ( Choice 2 Daily Sum, Choice 3 daily Sum, Total Daily Sum) In "Daily Totals" Sheet for Column "# of Bookings that day" I used the formula =COUNTA(FILTER(Source!C:C,$A2=Source!$A:$A)) ; Where C:C is The "Description Of Booking (leave blank if none)" column in the "Source" sheet, $A2 is the Date in the "Daily Totals" Sheet, & $A:$A is the Date in the "Source" sheet. Here is a copy of the sheet that you made with the adjustments that I have made.
H: How do I change the date format in App Preview and WebApps? When I have a date question in a form, the result in App Preview is shown in the format "mm/dd/yyyy". I was hoping to have the date displayed in the format "dd/mm/yyyy" or "yyyy/mm/dd" to be less ambiguous. How would I go about doing this? I tried changing my browser's locale, but that didn't change the way the date was displayed. AI: At the moment, it is impossible to change the date format in Web Apps. It currently displays as MM/DD/YYYY (month/day/year).
H: How can I sign in to a newly created Gmail account? I added a third Gmail account last night. I am unable to log into it from another computer. If I go to gmail.com, it takes me to https://mail.google.com/mail/u/0/#inbox (automatically logs me into one of my other accounts). If I then click "Add Account" on the upper-right button or icon (with my image or avatar), it takes me to a page where I can "Choose an account," but it only has the two previous accounts listed, not the one I added last night (which is open and available on the original computer). If I choose "Add an Account" again, there, it prompts me to sign in to to add another account, with the email address of the account currently open and a "Next" button. But nothing leads me to where I can select my new account. I know it's possible to have multiple Gmail accounts simultaneously open, because I always have different ones open at work, and I now have the three at home simultaneously open. So how can I find and open my third and newest account from a "foreign" machine (not the one on which the account was created)? AI: If I choose "Add an Account" again, there, it prompts me to sign in to to add another account, with the email address of the account currently open and a "Next" button. But nothing leads me to where I can select my new account On this page, there will be a link below the login box saying "Sign in as another user" or similar. That will take you to a page where you can login as the new user.
H: Combine multiple " = " criteria into one statement I'm doing a filter and I basically have this filter('Sheet'!B2:B, ('Sheet'!A2:A=1)+ ('Sheet'!A2:A=2)+ ('Sheet'!A2:A=3)+ ('Sheet'!A2:A=4)+ ('Sheet'!A2:A=5) ) I'd like to simplify this as follows: filter('Sheet'!B2:B, 'Sheet'!A2:A in (1,2,3,4,5) ) Anyone have any idea if I can do this? Here's a screenshot of my actual code: AI: =FILTER('Sheet'!B2:B, not(isna(match('Sheet'!A2:A, {1, 2, 3, 4, 5}, 0))))
H: How can I reference a Mobile worker's username in a case list filter in CommCare? I'm trying to create a case list filter in CommCare. Specifically I want to create a filter such that a case property (interviewer_username) is equal to the username of the person who is logged in. I have seen the instructions for how to do this using custom user data and the mobile worker first/last name, but how do you reference the username itself? AI: You can access the username of a user in the case list filter with this syntax: #user/username More information can be found here: https://confluence.dimagi.com/display/commcarepublic/User+Case. The username isn't stored in Custom User Data, but rather the User Case.
H: Explanation of form status filtering on mobile devices I would like to know the technical differences/important meanings behind the following five statuses of form on the mobile device. If you enter the 'saved forms' section of the app, we see four options (and my accompanying clarifying questions): All completed forms *Does this include all forms that the user hit 'submit' form, and the list includes all sent and unsent forms? Only submitted forms Only unsent forms *Does this list include forms that were completed on the tablet but not yet synced? Only incomplete forms Quarantined forms *I am not clear on what 'quarantined' forms are or how a form gets into this state. Additionally, regarding saved forms are kept on the device, what are the implications for how much space those saved forms take up? AI: Types of saved forms are listed below. For general knowledge: Saved forms are kept on device. The records are generally quite small, and won't affect much unless the forms include multimedia. CommCareHQ includes a configuration option to 'purge' saved forms after a certain number of days on device. All completed forms includes sent and unsent forms Unsent forms does include completed forms that haven't 'synced', but note that 'syncing' refers to a two-way data exchange (submit unsent forms, pull sync data), which is why the app refers to them as "unsent" rather than "unsynced" All completed forms Any form where the user has clicked the Finish button and the device has synced data to the local database (say, a new case is visible). Quarantined forms are not included in this list or any others (other than the Quarantine list) Only unsent forms Completed forms which have not been submitted to the server Only submitted forms Forms which have been completed and are reflected on the server. Only incomplete forms Forms which have been saved as incomplete and are not processed by the user because they have not clicked Finish. Case changes from these forms will not be visible in case lists, and the forms will not be submitted to the server until the form is completed. Quarantined forms In exceptional circumstances it is sometimes the case that a form is completed but before it can be sent to the server some event occurs which renders the record unusable. When this occurs, CommCare 'Quarantine's the form to prevent future problems (because otherwise forms entered after that form could not be submitted), but leaves the record on device for troubleshooting purposes. If you long-click a record in the saved forms list you can choose Scan Record Integrity which will give you useful output about the record. For a concrete example of when a Quarantine could occur User Saves a form as complete while offline User logs out of CommCare User navigates to the directory where the encrypted files are saved to disk User deletes the encrypted form record When CommCare starts up next, it will look for the saved form to submit it to the server, and identify that the file itself is missing and quarantine the record after logging the event.
H: Removing file from Google Docs I have added a file to google docs, which is not as similar to making a copy. It is like making a shortcut like thing (in windows terminology) or link like thing (in linux terminolgy) with a catch that if you remove any of the file the parent or the child both of them gets deleted. My question is how to delete any one of them? Searching something like this "removing added google docs" gives a completely irrelevant result. AI: Short answer At this time it's not possible. Explanation I think that instead of seeing the Google Documents and the other Google editors apps like an OS file explorer we should see them as Google Search, so instead of asking how to "delete" we should ask something like "how to remove" as the question of this title does at this time, or how to avoid that a file is shown in the "search results" So I imagine that the solution will be something similar to Google Custom Search or add-on that removes certain "search results", like Personal Block List (by Google)
H: Import a JSON query from investing.com I've trying this for several days and I'm not able to load the data displayed below the graph in https://es.investing.com/equities/facebook-inc IMPORTHTML does not work because these fields are the response from a JSON query. I've used Chrome Dev Tools to save the result in a HAR file and found one of the fields "Retorno un año", but I am not able to automatize the query (curl cmd only returns the .js source code, not the response, it was the first time that I used it...): Any ideas about how to import these fields into a Google Docs Spreadsheet? P.S.: I can't paste the commands due to my low reputation (no more than 1 URL allowed), sorry :( AI: You can pull in all those fields using importxml instead of importhtml: =IMPORTXML("https://es.investing.com/equities/facebook-inc","//*[@class='clear overviewDataTable']/*")
H: Can mobile workers view case data from multiple locations? In my application cases are configured to be owned by locations-- in this case, villages. Mobile workers can work in multiple villages and need to be able to see case details from each of the villages to which they are assigned. Is it possible for mobile workers to view case data from multiple locations? AI: You can assign multiple locations to users, they'll be able to see cases associated with any of their assigned locations.
H: Can I use the bulk upload option to assign mobile workers to multiple locations? I am migrating several mobile workers to a locations structure and need to assign each mobile worker to a set of assigned locations from the organization structure. In the mobile worker bulk upload excel file it appears that there is only one field for entering the mobile worker's location ("location_code 1"). Is it possible to add or modify fields in this export that will enable assigning mobile workers to multiple locations using bulk upload? AI: My technique has been: Use the web interface to add locations to one specific user so that they've got more assigned locations than you'll most likely use in reality (maybe a test user) Download your bulk mobile user file There will now be more than enough location columns to handle the locations you need to assign. Fill in columns as needed and then upload
H: Calculate time difference between times past midnight I have two lists of time, one a set of starts and the other a set of ends, I want to calculate the duration between them and sum them. When the end time goes past midnight, I experience a problem. I can calculate the difference between the times correctly, but the sum of the duration is incorrect. Here is the data and the result: Here are my formulas: AI: You have two problems, you are neither displaying, nor calculating the duration correctly. Quick Answer: Format your duration column as Format > number > duration. Use the formula =B2-A2+(B2<A2) to calculate a duration effectively. Formulas: Results: Explanation: The duration is being displayed as a time and not a duration. Here you can see the same difference, one formatted as automatic, which defaults to time, the other is formatted as a duration: The formula =B2-A2+(B2<A2) returns the difference between the two times, and adds 1 day if minuend is less than the subtrahend, it adds 0 days otherwise.
H: How can you import an image from a URL via a function in EtherCalc? In EtherCalc I would like to have a barcode generated for each row on the basis of the contents in its first cell. Specifically I would like to get an image back from: http://www.barcodes4.me/apidocumentation according to the value held in the first cell of the row and display the image in column B. Is there a way of doing that? AI: ethercalc image formula ="{image: http://www.barcodes4.me/barcode/"&B2&"/AnyValueYouWish.png }" this will use the code in cell b2 to create the barcode see http://sheet.cellmaster.com.au/example_barcode Other examples http://sheet.cellmaster.com.au/examples
H: Choose "Type" of Input Number When Using Number Formatting So I have the a formula that outputs a duration as seconds with three digits of milliseconds. For example if the formula outputs 67.769, It should be formatted as 01:07.769 I tried using mm":"ss"."000, but that gave me 27:21.600 It seems to be trying to process the number as a date; how do I prevent this? AI: The date-time value unit in Google Sheets is one day, so you should convert your formula output to days, then apply the duration formatting. Assume that the referred formula is on cell A1 and that you want to get the result on cell B1. The formula to use on B1 one could be =A1/60/24 or something similar. Then apply to B1 the following custom format [h]:mm:ss.000
H: Can I convert a formula within a formula to a value? I am using this formula within a Google Sheets cell to search and match the barcode I am looking for: =INDEX(UPCCodes!B:B,MATCH(N2,UPCCodes!A:A,0)) The reason this isn't working, is because N2 is another formula: =RIGHT(Extract!C5,LEN(Extract!C5)-FIND(":",Extract!C5)) I know if I convert the N2 formula to value, then it will work. For example, this works just fine: =INDEX(UPCCodes!B:B,MATCH("TX4011SBR",UPCCodes!A:A,0)) This does add an extra step in which I need to go in and convert formula result to value. And I was wondering if there was a more automated option of converting formula result to value? If I added the value manually, it works properly: =INDEX(UPCCodes!B:B,MATCH("2002xlb",UPCCodes!A:A,0)) AI: You have an extra white space in the result of your formula, it's quite easy to miss. Always "sanitize" your input to lookups by enclosing the call to the text processing formula in a TRIM() function like so: =INDEX(UPCCodes!B:B,MATCH(TRIM(N2),UPCCodes!A:A,0)) See the error message on your screenshot there's a white space between the quote mark and the first digit! did not find value ' 2002XLB' ... Etc As for your question, compound functions should work in any spreadsheet, as long as they return a value of the type expected by the enclosing function. That's the reason you're getting a lookup error, (did not find value ) the MATCH() function is working fine, except there is no index ' 2002XLB' in your table. ' 2002XLB' != '2002XLB' If MATCH() were getting an unexpected value type, you'd get a N/A error. The error message is always a good hint into what went wrong :) Also, this is a very common scraping error. Get in the habit of sanitizing and normalizing strings before a lookup (trimming stray whitespace, making the key ALL CAPS, (helps with case sensitivity) validating with the info functions before lookups (isnumber(), isemail(), isnull() and friends )
H: Add my scripts or add-ons to new Google doc I've created a script or add on for my Google Document. The script exports the content to basic HTML. When I create a new doc I can't find a way to import the scripts from the existing document. From the Google Document I have gone to Tools > Script editor. A blank script is created but I can't open or find any existing scripts. Screenshot of my script and add-on: When I create a new doc and go to the script editor I can't find any to open? AI: There are two basic categories of Apps Script files - Bound to the document (Sheet, Doc, Form) Stand Alone Bound files do not show up in your Google Drive. Stand Alone Apps Scripts files do show up in your Google Drive. You can create multiple projects inside of an Apps Script file, but projects in other files can not be searched or loaded into the code editor. So, you can't do what you want to do. If you want to share an Apps Script file to multiple documents, you have two options. Library Add-on A Library runs slower, and is not totally secure if you want to protect your code. An Add-on has a one-time $5 dollar fee to be able to publish the Add-on. The best option, in my opinion, is to use an Add-on from a stand alone Apps Script file.
H: Rules for Gmail for setting specific folders for emails received Microsoft Outlook automatically groups items by date. And can also group items manually by using standard arrangements or by creating own custom grouping and the best one is creating rules. I got rules with my outlook before, this setting specific folder for specific emails that I received. This stuff I'am looking for my gmail. Is this possible with gmail or there are existing way for gmail to do it? AI: Some of what you can accomplish in Outlook rules you can do with Gmail filters. Gmail filters let you use a search term and, when a message arrives, if it matches the search, it will apply the actions of the filter. There are several things you can do, but primarily what you're interested in is applying a label. Please note that labels in Gmail are different than folders in Outlook. A message/conversation can have multiple different labels, whereas in Outlook (and similar mail clients) a message can only be in one folder. There's no "grouping" or custom sorting. All conversations are listed in strict reverse chronological order. To limit your view, you need to search. (Which is what you would expect from Google.) In fact, viewing all of the messages with a particular label is just a search with a special operator: label:{label-name}. More information: Gmail Support: Organize your Gmail inbox using labels Create rules to filter your emails How-To Geek: Inbox Management and Labels
H: Formula to compute the cardinality of the intersection of two sets of dates Given: Two dates, the bounds of a date range; A list of dates (given in-extenso in a line or a column); Is there a way, in Google Spreadsheet, to get the number of dates (days) in the date range that are included in the list of dates ? Example: [2017-01-01;2017-01-31] intersected with {2017-01-01, 2017-03-01} would yield 1 Because the range on the left hand side, seen as a set, contains the 31 days of January {2017-01-01, ..., 2017-01-31} and the set on the right hand side contains the date 2017-01-01, which is a day of January. AI: Assume that: A1: Holds the start date A2: Holds the end date Column B holds the list of dates to count =QUERY( B:B, "select COUNT(B) where B >= date '"& TEXT(A1,"yyyy-mm-dd")& "' AND B <= date '"& TEXT(A2,"yyyy-mm-dd")& "' label COUNT(B) ''" )
H: How can one become a YouTube translator? YouTube Help explains how to buy translations for videos, titles, & descriptions (the comma after "titles" is quoted as-is - maybe they need a translator ;-) But how can one sell translations for videos, titles, & descriptions? Just curious how do companies get to offer their services there. AI: YouTube generally uses big outsourcing contractors for this. I'll try to get an answer from my contacts as to which one.
H: Can you create a child case of a child case in a normal module in CommCare? How can I create a child case of a child case in one form in a normal module? Is it imperative to use advanced modules to achieve this kind of case creation in one form? AI: Unfortunately, you cannot create a grandchild case in a form in a regular module. Without using advanced modules, the best thing you could do would be to open a child case and then go into another form in a module of the child case type and open the grandchild case there.
H: Do all YouTube videos have captions? The questions only concerns the following languages: English, Dutch, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish After reading YouTube's official documentation, it would appear that all videos have automatically generated subtitles. However, for example this video doesn't have captions of any kind. Review, edit, or unpublish automatic captions If automatic captions are available, they'll automatically be published on the video. Automatic captions may not be ready at the time that you upload a video. Processing time depends on the complexity of the video's audio. AI: You sort of answered your own question. IF YouTube can generate captions for a video, you'll see them. If they can't, there won't be any automatic captions. Also, if the channel owner doesn't want automatic captions on the video, they can remove them from view.
H: GitHub pages 404 File Not Found error I am attempting to publish a website using github pages. I have a Index.HTML, and see the message "Your site is published at https://starsweeper.github.io/" in the repository settings, but when I go to the page I see the message 404 File not found The site configured at this address does not contain the requested file. Here is the repository: https://github.com/starSweeper/starSweeper.github.io What am I doing wrong? AI: It seems the problem was the incorrect casing of Index.HTML. This should be all lowercase. ie. index.html. I didn't realize the file names were also case sensitive. The case-sensitivity, in this case, is dependent on the underlying operating system. Linux/unix is case-sensitive, Windows is not. But URLs are always case-sensitive.
H: Find a name a of YouTube video from a deleted account I keep some pretty rare music tracks that can't be found anywhere else on a 'not-on-Spotify' playlist on YouTube. I just figured out today that a video of this playlist has been removed (user account has been deleted actually). Here is the link I still can see on the playlist: https://www.youtube.com/watch?v=bkdVDF96v5A I have tried to: Google it Search it on: http://keepvid.com Search for it on TheWaybackMachine: https://archive.org/web/ No results. I'm really desperate, that really pisses me off. Any other idea might be of great help. https://www.youtube.com/watch?v=bkdVDF96v5A AI: Searching for just the videoID, it appears that the title in question is "Mick jenkins on the map".
H: How do I invite others to my Google Calendar event using Quick Add? I want to be able to schedule a meeting with someone else at my company in as few steps as possible. It looks like the Quick Add feature used to auto-invite email addresses that you included in the event text: https://webapps.stackexchange.com/a/26880/127103. This no longer seems to be the case. Was this removed? Any way to bring it back? Any other ways to quickly schedule with a certain person? AI: It seems that functionality was removed in the latter half of 2013 or early 2014. Compare these pages from the Wayback Machine: Google Support: About the 'Quick Add' feature - captured 2013-04-04 Specifically mentions using an email address as part of the string. Google Support: About the 'Quick Add' feature - captured 2014-04-21 You'll note that where it used to see you just needed to include "What, When, Who, Where", it now just tells you it needs "What, When, Where". I don't know why it was removed. I suspect because it was too easy for people to get spammed with event invitations they didn't want. To invite people you need to use the full event editor.
H: Sum data based on dates I have a Google Sheet of data like this: 4/1/17 | 5 4/1/17 | 7 4/1/17 | 22 4/2/17 | 5 4/2/17 | 10 4/3/17 | 5 4/3/17 | 23 4/3/17 | 1 4/3/17 | 5 4/3/17 | 17 4/3/17 | 3 And I want some sort of formula that I can apply to this range to return this: 4/1/17 | 34 4/2/17 | 15 4/3/17 | 54 (Obviously any date can have any number of entries and it needs to be expandable so that another date can be added - e.g. 4/4/17 - and the "result range" will automatically populate a new row) Any suggestions? AI: If your data is in ColumnsA:B then your first date in say D1 and in E1: =sumif(A:A,D1,B:B) is not fully automatic (you would have to drag D1:E1 down to suit) but should give the desired output. Provided dragged far enough further data added to B:C should update D:E.
H: Count occurrences of words in Google Spreadsheet if the words are not known in advance I have a sheet of names containing two columns: name and tags. Tags are separated by commas plus optional spaces. More than one tags can be in a single cell. Like this: Name | Tags --------+-------------------------------- Alice | female, fast, archer, starred Bob | male, starred Cecile | female, support The sheet contains hundreds of names and a 0..5 tags for each name. As output, I need a list of tags and the number of their occurrences. Something like this: Tag | Occurrences --------+------------ female | 2 fast | 1 archer | 1 starred | 2 male | 1 support | 1 How can I do this? I've been googling for hours, but couldn't find the solution so far. AI: If your tags occur in Col B (starting at row 2), paste the below formula in column C (row 2) to get all unique tags in the Col B =unique(transpose(split(CONCATENATE(arrayformula(B2:B&",")),","))) To get the number of occurrence of certain tag in col B, paste the below in col D row 2 =ARRAYFORMULA(if(countif(transpose(split(CONCATENATE((B2:B&",")),",")),C2:C) = 0, "",countif(transpose(split(CONCATENATE((B2:B&",")),",")),C2:C))) All the formulas used are standard formulas in Google Sheets.
H: How to update Facebook Profile without announcing it to everyone? How do I update my profile Basic Info, such as location, education, job, etc. without triggering a notification on Friends' Notification (upper left) or their Wall/Timeline/Recent Friend Activity page. I notice things like "User X has posted/updated their profile for the first time in a while", which I DO NOT want. I DO want friends who visit my actual page to see the the new info, also without any indication that this has been updated (as in recently, I guess). Question: If I set Basic Info privacy levels to "Only Me", update the Basic Info, wait 24 hours (why? because things take time), then switch the privacy level back to "Friends Only". Will this accomplish what I am looking for? AI: Click the update info button of whatever information you wish to update and hit edit. Click the privacy setting button next to the specific item you will change, and then change the setting to “Only Me.” Enter your new information, and then save it. Because you set the privacy setting to "Only Me" no one will see the information on their feed but can't see it on your timeline either. Click the Activity Log button near the top of your timeline Click the pencil button next to whatever update you just made and select "Hidden from Timeline" Return to your timeline and go back to the update info section and whatever new information you just updated, and change it's privacy setting back to it's original state. Because you have hidden the update on your own timeline, the update won't appear in your friends timeline either, but if they very specifically click on your page they will see the updated information. Waiting 24 hours does nothing other than moving that information further down peoples timelines and notifications. This method will make sure that it never appears on their timelines in the first place.
H: Am I automatically considered to be following one whom I connect through LinkedIn? I've just found that I'm following all people whom I connected to. There are two ways to connect people through LinkedIn 1. Send an invitation and 2. Accept an invitation. Either way you connect the people I think it is also considered following automatically. So, Is connecting people automatically consider following them upon connection? Can I stop it? or I've to manually manage it individually? I've found that you can also follow one without connecting. Similarly you can unfollow one whom you're connected with. What is the difference between connecting people and following people? Note that I'm talking about peoples only not about following groups or companies. AI: LinkedIn defines a connection as a two-way relationship of trust between people who know each other. If you are connected to someone, you’re following him or her by default and vice-versa. So yes, to unfollow anyone you have to manually manage it individually. Yes, you can follow anyone to get their updates on your home page. Once you follow them they will get notification about it. They will not get any update from you if they are not following you. You can unfollow anyone anytime. They will not get notification about it. See the LinkedIn Help to know about Similarities and Differences Between Following And Connecting.
H: How to extract the Account's Name according with the total of members? For each relevant row I would like to have ColumnC populated with the value from ColumnA repeated (one above the other) in the C cell the number of times there are separate (one above the other) entries in the correponding B column. Is it possible? Example sheet AI: Maybe the result you want can be achieved with: =ArrayFormula(left(REPT(A1:A&char(10),len(B1:B)-len(substitute(B1:B,CHAR(10),""))+1),LEN(REPT(A1:A&char(10),len(B1:B)-len(substitute(B1:B,CHAR(10),""))+1))-1)) but I have made no attempt to optimise it.
H: How do I search a sub-string within a range in Google SpreadSheets? I have looked for some functions like SEARCH(), MATCH(), FIND() but no one can really search a substring in a range and then it returns the row number, position or at least true/false. Here is my case, I have a sheet like this: ----------------------------- | Group | People | ----------------------------- | Company - Tech | 16 | | Company - Sup | 3 | | Company - Assist | 8 | | Family - Extend | 12 | | Family - Closed | 3 | ----------------------------- Now I need to do count people whose appropriate to similar groups: Company and Family. | Big Group | Count | ---------------------------- | Company | ? | | Family | ? | How do I do it on this Google SpreadSheets AI: You can use the following: =IF(A10<>"",SUMIF($A$2:$A$6,"*"&A10&"*",$B$2:$B$6),"") A10 is the reference of "Company" in the Big Group Write the formula instead of ? under Count Sumif will test the whole column A ($A$2:$A$6 change it to correspond to all your Data in A and keep $) for Company (whatever is written with Company) and sum the corresponding Number in People Column $B$2:$B$6) You can drag the formula Keep the $ in the references for Absolute references And change A and B to correspond to your Data (from first to last Row)
H: How to import only sheets with specific text in the name? I'm using this script but it takes all sheets of current spreadsheet. A bit modified script from original, but it doesn't achieve what I want: function importallMain() { var id = 'some id'; var ss = SpreadsheetApp.openById(id); //Managed to exclude first 7 from array because adds (;) var imports = ss.getSheets().splice(7).map(function(s) { if(['MasterBook', 'MasterClients', 'Rates', 'Listing', 'CreateDOC', 'Accounting' , 'Project'].indexOf(s.getName()) == -1) // Excluding by name return 'importrange("' + id + '", "' + s.getName() + '!A11:Y500")'; }); var formula = '=query({' + imports.join('; ') + '},"Select * where Col3 <> \'\' ")'; SpreadsheetApp.getActiveSheet().getRange("A2").setFormula(formula); } What I would like is that it would take sheets whose names contain Ready. AI: You can use string.match() of JavaScript to find the string "ready" in the name and only take those sheets. Like so: function importallMain() { var id = 'some id'; var ss = SpreadsheetApp.openById(id); //Managed to exclude first 7 from array because adds (;) var imports = ss.getSheets().splice(7).map(function(s) { var sheetName = s.getName() if(sheetName.match("Ready") != null) // Excluding sheet that dont have ready in their name! return 'importrange("' + id + '", "' + s.getName() + '!A11:Y500")'; }); var formula = '=query({' + imports.join('; ') + '},"Select * where Col3 <> \'\' ")'; SpreadsheetApp.getActiveSheet().getRange("A2").setFormula(formula); }
H: How can I configure a case list to autoselect the child case of a parent case in Advanced modules? I want to set up an advanced module form such that the user selects a parent case and the form auto-selects the child case to update. I see that in this documentation this should be possible with auto-select cases, however I'm not exactly sure how I should configure saving a case ID such that this functionality will work. How should I set up my case list configuration to auto-select the child case based on the parent case? AI: I'm going to assume I have a case structure where we have a "client" case and under the client a "pregnancy" case. A critical assumption for auto-selection to make sense is that there will always be 1 and only 1 pregnancy case per client case. You can ensure that this is true by filtering the form so that it only shows for clients who have a pregnancy case. I assume that I already have an action for the client case with case tag load_client_1. Add an action of type "Automatic Case Selection". You want to use Autoselect mode "Raw". The Expected Case Type is "pregnancy" and the Case Tag is whatever you want to use to reference this case in the form (example: autoload_pregnancy_2). Here is the XPath function: instance('casedb')/casedb/case[index/parent=instance('commcaresession')/session/data/case_id_load_client_1][@status='open'][@case_type='pregnancy'][1]/@case_id This expression grabs the first open case from the casedb whose parent id matches the loaded client case's id. The [1] filter is important to protect against throwing an error if for some reason a client were to end up with 2 pregnancy child cases (this is technically possible in bad connectivity with case sharing). If you have a host-extension relationship rather than parent-child, just replace the index/parent above with index/host.
H: Countifs with OR over a range My spreadsheet is as follows (sorry about the crude setup). A B C D E F G 1 Order FB? TW G+ YT LI Frequency? 2 1 x - x - x daily 3 2 - - - x x monthly 4 3 - - - - x daily 5 4 x x - - x never 6 5 - - - - - never +1000 more rows with the same logic On another sheet, I'm using COUNTIFS to extract the total number of those with daily, monhtly, etc frequency of publishing. Now, to my problem. Notice how in the sixth row nothing is marked? My problem is that this isn't the only row with that setup, and, as far as I can tell by skimming the filtered table, it only happens in the rows with the frequency of never. I would like to make a COUNTIFS which would look at the rows with the frequency of never and check if there's no x in any of the B-F columns for the corresponding row. These values shouldn't be counted. Or, to put things differently, it should only count a row with the frequency of never if there's at least one x in any of the B-F columns for the current row. I'm guessing I should use a combination of COUNTIFS and OR, but I'm not sure how. How can I achieve that? AI: Crude but simple, please try: =countifs(G:G,"never",B:B,"<>x",C:C,"<>x",D:D,"<>x",E:E,"<>x",F:F,"<>x") There may be "better" answers (eg that don't apply countifs) but possibly depending upon whether your dashes are in your spreadsheet or just included above for presentation. For example, if those nevers are not to be counted you might consider whether you could filter to select those rows and delete them (presumably would leave gaps in Order however). Leave out the first pair (G:G,"never",) and it count rows without any x regardless of what is in ColumnG.
H: Google sheets, get the last row number of repeated value I have column like so Mike Fred Mike Andy Mike I want to return to me the last row number where the column = Mike. So in this case the output should be 5 I've think its combination of max filter row functions but need help on putting it together. Or maybe it could be done another way. This is my best attempt so far: = ROW (FILTER(A1:A, ROW(A1:A) =MAX( FILTER( ROW(A1:A) , ("Mike")))) ) AI: =max(arrayformula(if(A1:A5="Mike", row(A1:A5), 0)))
H: Can Google Docs auto-correct capitalization? In Microsoft Word, you can change capitalization in a document using the Change Case button. It includes options for Sentence case, lowercase, UPPERCASE, Capitalize Each Word, and tOGGLE cASE. Does Google Docs have anything similar for auto-correcting capitalization? AI: The Change Case addon for Google Docs should do the trick. Make changes to the case of text in block selections: uppercase, lowercase, first letter capitals, invert, sentence and title case. Current features: All characters to uppercase All characters to lowercase First letter capitals Invert the case of each character Sentence case capitalization Title case capitalization
H: What does the "pop" function do when I'm editing a photo? I'm trying to edit picture in photos.google. When I press edit I see the following: I understand what is Light and Color, but what is Pop? AI: The pop effect is simply an increase in local contrast.
H: Shortcut for multiple columns in query? What's the shortcut for =QUERY($A:$K, "select A where B contains '"&N1&"' or C contains '"&N1&"' or D contains'"&N1&"' or E contains '"&N1&"' or F contains '"&N1&"' or G contains '"&N1&"' or H contains '"&N1&"' or I contains '"&N1&"' or J contains '"&N1&"' or K contains '"&N1&"'",3) ? I'm hoping for something like =QUERY($A:$K, "select A where B,C,D,E,F,G,H,I,J,K contains '"&N1&"'",3) Cross-posted to Stack Overflow AI: Add a column (L for example) to count whether "N1" features in any of the columns of interest, say with: =countif(B4:K4,"*"&N$1&"*") copied down to suit and use that in the query: =query(A:L,"select A where L>0",3)
H: Restrict master branch/pull request access to certain users I'd like to restrict write access to the master branch in a github organization repository to its owner (namely me). This would enforce all contributors to make a branch instead of committing directly to master. If possible, I would also like to restrict access to approving pull requests to only me. I did some research and came across GitHub protected branches, and I believe it might be the solution. But there are too many options to understand. The linked help page didn't help me either. AI: Yes, you will want to look into the Protected Branch settings. If others need to do their work on another branch instead of working directly off master, check the following box: Require pull request reviews before merging When enabled, all commits must be made to a non-protected branch and submitted via a pull request with at least one approved review and no changes requested before it can be merged into master. To then also limit who can approve it should be by selecting this checkbox: Restrict who can push to matching branches Specify people, teams or apps allowed to push to matching branches. Required status checks will still prevent these people, teams and apps from merging if the checks fail. By default that will restrict it to admins only. If the repo has other admins listed then you'll want to get that sorted out because the included owners are: Organization and repository administrators - These members can always push.
H: Is it possible to get a timestamp for the exact time a question is answered in a form? I would like to know the exact time the user answers a specific question in the form. Is this possible using the now() function in CommCare? For example, if i wanted to know what time the question alis_favorite_color is aswered, and I created a hidden value alis_favorite_color_time and set the display condition of that HV as alis_favorite_color != '' and the calculate condition as double(now()), what will the output of the alis_favorite_color_time HV? Will it be the time at which the display condition evaluates to TRUE, or will it be the time of completion of the form? AI: now() will be calculated at various times (form start, form validation, etc) outside of your control. Calculate conditions are (somewhat unintuitively) processed independently of their display conditions, so the app doesn't delay processing the now() function until it is relevant to the form. The only way to accomplish what you are describing in the current app is to create a repeat which starts with 0 elements, then conditionally sets its count to 1 element when the question is answered, and setting the time condition in the default value of an element in that repeat. That repeat will need at least one question inside of it (not a hidden value), but that question can have a false() display condition. The user will also still need to navigate over the repeat. IE: the now() won't be triggered until the user swipes over where the repeat is in the form's structure.
H: Is there a way to add back a small subset of media files to a CommCare mobile app without reinstalling? Some users' CommCare app is showing that some media files are missing (instead of an image there is a "jpg is missing" message). These files are on CommCareHQ so it seems like they were just deleted from the phones. Is there an easy way to just reinstall the specific multimedia files (or all of the multimedia) without reinstalling the entire app? AI: There is a way to install multimedia that does not involve reinstalling the application, though it will take a few steps. First, you will need a zip file containing all of the multimedia from the application. You can get this by proceeding to the Multimedia Reference Checker for the application on CommCareHQ and selecting Download Zip. Next you will need to transfer the zip file onto the device. You can transfer it to any location on the device, though I would recommend a simple spot like the Downloads folder. Once you have placed the zip file on the device with missing multimedia, login to the application. Select the Menu option from the home screen (on most devices, 3 dots in top right of screen). Select 'Advanced,' followed by 'Validate Multimedia.' If there is missing multimedia, you will be brought to a screen that states what files are missing (If all media is there, you will receive a message stating all media validated and will be returned to the home screen). Select the Menu option again and note the option 'Install Multimedia' - select this. On the next screen, the path to the Zip file you transferred to the device should appear automatically. Select Install Multimedia and you should be good to go. If the file path does not appear automatically, you will need to select the file image and find the zip file on the device before selecting Install Multimedia.
H: How do I activate "dense roster" on Google Hangouts? For some random reason, perhaps in another bid to gain user engagement, Gchat in Gmail is being suddenly replaced with Google Hangouts. It says that if I like it looking the way it is now, I'm encouraged to choose the "dense roster" setting. Where is this setting? It doesn't seem to be anywhere in Gmail settings. AI: You don't have to visit https://hangouts.google.com. "Use dense roster" is easily found within Gmail (left panel) by just clicking the little down arrow by your Icon/username in the chat/hangout area. You don't even need to navigate Settings.
H: syntax for referencing user case properties I created a user case property in my app, and now I'd like to reference the value of that user case property in a concat function. It is being referenced in a Report Module to indicate at which y_value I want my 'Y Label' to appear. The syntax for y-labels is: '{ "y_value": "Y Label" }' Because my y_value is dependent on the user, I have created a y_value user case property to reference in the above expression. In order to do so, I will need to concatenate the pieces of the above string with an xpath expression: concat('{ "', instance('commcaresession')/session/user/data/y_value, '": "Y Label" }') But that is giving me an xpath error on mobile (saying it is not a valid question or value). Is this the correct syntax to reference a user case property in this context? instance('commcaresession')/session/user/data/y_value I got it from the custom user data wiki because the user case wiki doesn't have any info about syntax, but that expression is throwing an xpath error on mobile. Wondering if user case uses different syntax. AI: The form builder references the user case like this (broken onto multiple lines for readability): instance('casedb')/casedb/case[@case_type = 'commcare-user'][ hq_user_id = instance('commcaresession')/session/context/userid ]/y_value If you have the "Easy-reference user properties in the form builder" feature flag enabled you can reference the user properties (aka, the user case) with syntax like #user/y_value from within the form builder.
H: Is there a way to join all the values from a multi-select lookup table question with commas in a label? I have a multi-select question that pulls its values from a lookup table. Once the user has selected some of these options, I want to show them to the user in a comma-separated list. The lookup table has a 'value' column, which is a snake_case version of the 'name' column which has a human-readable version of the item the user is selecting. I would like to display the human-readable version of all of the items the user has selected in a label. I've tried 2 approaches: 1) set the 'value field' of the lookup table question to be the 'name' column then use replace(/path/to/question, " ", ", ") to show the results comma separated. Unfortunately this doesn't work because some of the names have spaces in them, and these are getting replaced by commas. 2) Use a repeat group to loop over each of the selected items in the question and compile a label using selected-at(/path-to-question/, position(..)). This doesn't work because the label doesn't update if the user deselects options they previously selected. Is there another way of doing this? AI: Are you able to change how the values are stored int he lookup table? If you could change the spaces in the values to "_" you'd be able to use replace as you want to. I think it's bad practice to store spaces as values anyway ... when you export that data you'll have the same issue with separating out the responses. If you change to "_" in your data you should be able to nest the replaces to display the values without "_"'s to the users: replace(replace(path/to/question, " ", ","), "_", " ") That would convert: "option_1 option_2 option_3" to "option 1, option 2, option 3."
H: How to apply a relative reference in conditional formatting formula? I have a whole bunch of cells (28 so far) that need conditional formatting. Here is what the data looks like: I want the colours in the top "Last Period" metric cells to vary depending on the values inside the three rows below: so if the top number is bigger than the grey number, it's light green; if also bigger than the blue number, the text goes yellow; and if also bigger than the purple number, the cell shoots confetti out of the screen and onto the user's lap. Likewise if it is lower it sends a negative signal(s), perhaps ultimately producing a foul sour milk smell, filling the user's office with shame. Here is an example of one formula, which turns the cell background a nice shade of green when the percent difference between D5 and D6 is higher than 1. =D5/REGEXEXTRACT(D6,"\((.*)\)")*1>1 It works—BUT (there's the "but"), I can't apply a proper cell range to this condition, because I really want to say, "if the cell being tested is bigger than the cell below it, turn green." Otherwise it's always testing against D5 and D6. From what I understand, the only way I could do it is to create conditional formatting for each and every of the dozens of cells... which is just not going to happen. Sheet link Would a script be better for this kind of feat? AI: Try this: =INDIRECT(ADDRESS(ROW(),COLUMN(),4))/REGEXEXTRACT(INDIRECT(ADDRESS(ROW()+1,COLUMN(),4)),"\((.*)\)")*1>1 INDIRECT ADDRESS 1 ROW COLUMN 1 The third parameter in ADDRESS() is absolute_relative_mode [ OPTIONAL - 1 by default ] - An indicator of whether the reference is row/column absolute. 1 is row and column absolute (e.g. $A$1), 2 is row absolute and column relative (e.g. A$1), 3 is row relative and column absolute (e.g. $A1), and 4 is row and column relative (e.g. A1).
H: How do I search for posts in a Facebook group? How do I search for posts in a group? tells me to click Search this group in the top right. But that option is gone. There was a magnifying glass (from https://webapps.stackexchange.com/a/58082/35071), but it's not showing anymore: Is it still possible to search for posts/ content inside FB groups? AI: It has moved from Right Top side to the bottom of the Left Side bar Menu Items, but based on normal screen size, it will typically show in the middle of your PC screen. PS: Answer is courtesy and thanks to the comment from @pnuts.
H: Is it possible to SPLIT into specific delimiter columns? I have a column with multiple delimiters, but not all cells have all delimiters i.e. delimiter *@# *text1@text2#text3 *text1#text3 I there a way to SPLIT into col1 col2 col3 text1 text2 text3 text1 text3 AI: This should work for the examples you have provided: =if(and(left(A1)="*",countif(A1,"*#*")=1,countif(A1,"*@*")=0),split(SUBSTITUTE(A1,"#","* *"),"*"),split(substitute(substitute(A1,"@","*"),"#","*"),"*")) but with this approach the formula would be a lot longer (nesting many more similar IF statements) if to cover what it seems may be other possibilities.
H: IMPORTHTML - Google Sheets - Can't find specific table I'm trying to import a table on this page: http://www.fangraphs.com/statsplits.aspx?playerid=13593&position=2B/SS&season=2017#advanced As you can see there's three sections - "Standard", "Advanced" and "Batted Ball". I can't seem to get my IMPORTHTML function to find the "Advanced" table within the HTML. "0" returns the "Standard" table and I keep working my way up until nothing is returned. I tried making sense of the source but I'm in over my head. If anyone could point me in the right direction that would be great. AI: Would help to show what you tried, because this should work: =importhtml("http://www.fangraphs.com/statsplits.aspx?playerid=13593&position=2B/SS&season=2017","table",8)
H: Can a mobile user update a location's (custom) fields? I added several custom fields to my locations (organizations) hierarchy. These get pulled into hidden values in certain forms in order to be included on data exports. Each mobile user is assigned to multiple organizations. I have an "Edit form" that lets them edit certain information about each of their assigned organizations (e.g. if the contact phone number changes). This edits the organization's case properties. My question is: is it possible for a mobile user to edit one of these custom location fields? Or can it only be modified by web users? AI: Custom location fields cannot be updated by a CommCare application. If you need to have data that is associated with mobile workers that is editable, you could use the User Case, or like you noted you can add/modify properties on the organization's case.
H: How do you reference the user_id in a CommCare form? How do you reference the user_id of the user in a form in CommCare? AI: The syntax for referencing the user_id is /data/meta/userID The syntax for referencing the username is /data/meta/username
H: Hide public posts on Facebook profile I have certain posts that I want to be public, i.e. visible to everyone who has a link to it, shareable and re-postable, but I still would like to hide the post from the list of posts visible on my timeline to the public. In other words, I want to curate my public profile view independently of the privacy settings of the individual posts. Does Facebook support that? AI: Yes Make a post set to public then: Click the Activity Log button near the top of your timeline Click the pencil button next to whatever update you just made and select "Hidden from Timeline"
H: Is it possible to populate a Multiple Choice Lookup Table question from a case property holding a space-separated list in CommCare? I have a list of villages saved to the case as a space separated list. In my form, I want the user to be able to choose a village from this list, but I can't figure out how to set up the Multiple Choice Lookup Table question. I feel like the fact that the below question has an answer should mean that mine has an answer, but it's not clear to me how to extend it. Is it possible to use a repeat group to iterate over a space-separated list? AI: You could accomplish this workflow by creating a model iteration repeat using the space separated list (which is what is outlined in the previous question) before the multiple choice question, then using the repeats in the list as the input elements to the multiple choice question. When using Model Iteration repeats in this fashion, you'll need to include at least one non-hidden-value question in the repeat (you can set its display condition to false()) so the repeat "unrolls" before the multiple choice question in populated.
H: How to conditionally display possible answers to multiselect (checkbox) questions based on previously entered information in CommCare I would like to have the end user answer a checkbox question and then have subsequent checkbox questions display possible answers based on that previously answered question. For instance if the first question is "select which days of the week you ate ice cream" I would like the subsequent questions to be able to prompt the user with possible answers from that first question (e.g. "Of those days you ate ice cream, on which days did you eat strawberry ice cream") etc. Is it possible to conditionally filter possible answers to checkbox questions in CommCare? And if so how should I go about configuring my form to do so? AI: This is only possible using Lookup Tables, which allow filtering items with an xpath expression.
H: Checking unique case property (saving an ID) against already-saved case properties of other cases In a workflow where fields entered in a registration form are concatenated to create a unique ID (IE municipal and district IDs, date of birth, first two digits of first and last name, etc) and saved, is there a way to check the saved ID case property against the other existing IDs of the other cases to ensure you're not creating an identical ID? AI: I don't think there is a way to actively check (especially given the offline functionality). The best design solution I can think of is: The domain must be on the Standard Plan for User as a Case to be available Add custom user data number for each mobile worker (e.g. mobile user 1 = 01, mobile user 2 = 02) Add a counter that would increment for each case registered by each mobile worker Add the custom user data+counter number to each of the UIDs for the cases (e.g. the first case registered by mobile user 1 would be 011 = user case property + counter number)
H: How to change the picture in the upper right corner in Gmail? How to change the picture in the upper right corner in Gmail? The solution should work in all the (major) browsers. I usually keep opened several Gmail accounts in various tabs at the same time and it would be easier to quickly distinguish them. I am not asking how to change your profile picture, I have done that: However Gmail still uses just the fist letter of the name. AI: Click the icon that you marked red and click on change. You can upload a picture in the popup or use one that's already in your account. Screenshot Edit I also had to do a "hard refresh" in Chrome (Ctrl + F5) for the correct image to be displayed after visiting the site again. Before I did that the picture changed after I uploaded it and reset back to the letter on refreshing the page / visiting it again.