Google form edit link Collision Resolution - google-apps-script

So over the past couple of weeks I've been working on trying to create a way of using google forms as a kind of editable pdf. The idea is to have it be used as a group work order wherein the various people involved fill out the information pertaining to them as they acquire it. Now I know this isn't exactly what forms are designed to do, but it seems to mostly be working.
The way I have it right now is that the initial user creates the initial response, which triggers a script on the form submission, that sends out an editable link via email to all of the contributors to the form. Then whenever a contributor has information to add, they merely have to follow the link, make the change, submit the form and another email gets sent off alerting everyone of the edit.
The only problem with the system, however, comes when two users are filling out the edit link at the same time. At that point the collision resolution (or potentially a lack of collision resolution) for the edit link appears to kick in. The first user will submit and the form gets updated correctly, but once the second user submits, their changes override the changes of the first user. Looking at this from a user standpoint this would be highly confusing. Their change would appear to have been registered correctly, but in reality have been overwritten and discarded.
Now the ideal solution would be that the only changes that are overridden by the second user are those that actually have values in them. I.e. if user one answers question A, and user two answers question B, and both answer question C, only question C is actually overridden, instead of A and C.
I initially thought that perhaps I could compare the two form responses and find some way of doing the collision detection on my own, but there seems to be no way to edit the actual form responses, to change the data on the edit link to match. (Changing the spreadsheet values does not actually have any impact on the edit link itself)
So my question really boils down to is there a way to get this collision detection to work the way I am intending it to? And if there isn't any way to do that, what would be the best way to trigger off a warning email when a collision does happen so that the users would at least know that something went wrong?

Related

HTML Dropdown Menu Selections within URL

I'm not really sure how to ask this question, or whether it's even possible. I have previously built an android app that searched for data within a specific webpage and returned the data to the app. This app worked perfectly for over a year until the website in question performed a site wide session of prettying itself up, and in doing so, inadvertently breaking my app.
Within the new designed website, a dropdown menu has been added, which has several selections:
'Show20News',
'Show50News',
'Show100News',
'Show250News',
'Show500News'
The default selection is 'Show20News', and what I want is to make a selection of 'Show500News' instead. However, I want to append the selection to the URL, rather than manually selecting it. I have contacted the websites web team who just can't seem to understand what I am asking for, hence my visit here.
The website link:
https://www.londonstockexchange.com/news?tab=news-explorer&results=500&indices=AXX&sources=RNS&period=daily
What I'd like to achieve is adding the 'Show500News' selection from the dropdown menu to the end of the above URL, to avoid the manual process of getting the same results.
If you take a look at the source code of the link above, you will notice that there is no code that represents the possible selections. It is this that has me stumped. If possible I'm hoping that someone maybe able to nudge me in the right direction, or at least tell me if and why it's not possible. Thanks.

Hyperlinks (to Sharepoint) in MS-Access tables not behaving as expected

Hello StackOverflow community,
I've just started having an issue with hyperlinks stored within an MS-Access table not behaving as expected.
I have a small database which, among other things, records links to documents hosted on a company Sharepoint site. Until a few days ago, all was working fine with both the database and the hyperlinks.
For some reason, within the last few days, whenever I (or any of my users) click on these hyperlinks through an Access form (or me clicking directly from the tables), I am getting strange behavior:
Clicking the link does open a new instance of the default browser, as desired. And that browser does navigate to the company Sharepoint site. But none of the links actually open the specific document that they are intended to point to.
Instead, all links are bringing up a general file/folder menu within the Sharepoint site. It is almost as if these links point to a non-existent file within an existing folder.
The very strange part is, if I "edit" any of the hyperlinks in my database, and simply select and copy the "address" text from within the edit hyperlink window, I will always immediately pull up the correct desired document if just paste the address directly into a new browser window.
I would have thought that this type of cutting/pasting would necessarily be equivalent to simply clicking the link. But that is obviously not the case.
I feel like I can safely rule out the possibility that any changes to the Sharepoint site itself would be causing my issue with simply clicking the links (otherwise cutting/pasting the addresses would not bring up the correct documents), but I have to admit I am simply stumped as to why just clicking the hyperlinks directly used to work, but no longer does.
I don't believe there is any code or other relevant information that might be helpful that I am neglecting to include, but would be eager to provide any clarifications/etc if anyone has any idea as to what might be happening here.
Thanks in advance for any thoughts or suggestions!
~JQN
EDIT: I had deleted this question because the issue described above had simply stopped happening. I was unable to explain why, but was also unable to reproduce the issue again after a certain point within a day or two of making the original post.
Since then, the issue has returned. I've been able determine the following:
As described in my note below, when I am getting this odd link behavior, I do NOT get the standard warning from MS-Access indicating that hyperlinks may be harmful, etc.
Strangely, simply opening up a file dialog/file picker and then navigating through that dialog to any location on the (sync'ed) Sharepoint site seems to make the problem go away. I do not need to actually select or open any location on Sharepoint, simply navigating within the sync'ed folder structure seems to do the trick.
Once this happens, all links behave as intended again (ie. they open the correct linked file directly instead of landing on the root folder page). They MS-Access hyperlink warning returns as well. The file/link behavior will remain in that state for several days. Only after, I'd estimate, a week or more of inactivity since the file dialog was last run will the issue return.
FURTHER EDIT: New update...Enough time has passed so that the issue is recurring again. As suspected, links to pages outside of Sharepoint are not affected, and open as expected without issue. Once again, the standard Microsoft hyperlink warning dialog is not coming up for any links.
Obviously, now that I've found the work-around with the file dialog, it's easy enough for me to fix the issue when it arises. I'm hoping that this rings a bell with somebody, though, and perhaps one of you could point me in the right direction for a more complete fix for my users.
Thanks again for any help with this!
YET ANOTHER EDIT: Ok....based upon all the things I've learned in the last couple of weeks (as captured in this post and the comments below), I was about to delete this question and re-post it as "Why is Sharepoint redirecting my URL requests from MS-Access?" As I tried to search the forum to make sure that that question hasnt already been asked, I stumbled across some info that I think gets at the underlying issue:
It looks like this is related to the (very opaque) way that Office processes URL requests. It apparently doesn't simply open the document at the specified link, it first "pre-tests" (I suppose that's the right word) the URL by sending a "Microsoft Office Protocol Discovery" request first.
Apparently, it is possible for Sharepoint to somehow not like the particulars of that MOPD request, and if that happens, then Sharepoint redirects to the file directory page -- and that directory page ends up being opened in the browser instead of the intended link/document.
Again, this only happens sometimes and not others. When it does happen, I've found a clumsy workaround that will correct the issue for about a week or so. I can't reproduce the issue during that week, I just have to wait for the workaround to expire (I obviously don't fully understand why my clumsy workaround works).
It doesn't seem possible to manipulate the particulars of the MOPD request. If possible, I'd love to be able to dispense with MOPD entirely, since I want all the files I'm linking to via Access to be opened as read-only anyway. Unfortunately, I don't think that that is possible either.
I've found some info on this in another SO thread HERE. I still am not quite at the point where I feel I'm ready to submit an answer to this question, but I have some ideas as to what sorts of things may function as an acceptable workaround.
It would be helpful if anyone had any ideas as to how I might be able to reproduce the issue on demand, rather than simply waiting another week for whatever keys/cookies/settings/etc to expire again. I'd need to implement any possible solutions entirely on the Access side of things if possible, rather than on the Sharepoint/server side. Thanks again for any suggestions!
I'm posting this as an answer now, but will avoid accepting it until I've had a chance to verify that it actually works.
I am inserting some code that will run on DB startup. It will open a (an invisible) form that has an Access WebBrowser control included. I'll have that control navigate to a specific file on the Sharepoint site. I believe that it is actually this action that somehow causes the link problems to resolve for a week of so.
This form will run silently in the background, navigate to the sharepoint file location, and then close. This should hopefully refresh whatever characteristics of the MODP request that are present when the links work properly (and are absent while they aren't working properly).
In essence, I'm hoping this approach will have the effect of resetting my (approximately) one week window of desired link functionality to start anew each time the database is opened. In other words, I'm thinking that this will work, although I still don't fully understand why.
Wish me luck!
;)

Add additional and existing script to a Google form

I am currently building a Google form to help gauge a competency of our staff members. While building the Google forms you’re given several options when creating your question type, 9 to be exact. (text, paragraph text, multiple-choice, checkboxes, choose from a list, scale, grid, date and time I’m a definite novice when it comes to scripting with a simple understanding of different coding languages which helps me sift through the scripts so please bear with me.
So here’s my question, how would I add a paragraph text to the existing multiple-choice script in the Google form and is it possible?
Here’s a quick test question example we would like to apply to current Google form script:
Question: Do you have experience in handling cash?
Multiple-choice question: Yes or no? (Please explain your answer) <--- this is where I would like to add a script that would allow me to also include a paragraph text just below the multiple question.
I know I can organically create the entire test by adding landing pages as an option after choices made but this means creating a new page for every single question throughout the test with my 40 questions this means building 40 questions with 40 page landings would sound like a massive pain in the ass.
This may be an easy question for somebody out there but I’m sure it’s not going to be for most as I believe Google locks down the default scripting in new forms. My only hope is that the existing Google form that I create essentially belongs to us so re-scripting to add a paragraph text box may not be that big of a deal after all.
Per this discussion, there is currently no way to modify the action of Google Forms controls:
Google FormApp Customisation
If you have the time to get to grips with the UiApp, then you should probably do so, since (as you have discovered) Google Forms are extremely limited in terms of what can be achieved with them.
Additionally, Google handles the data transactions via a background service which makes any adjustments post-contruction liable to cause significant problems with your process. For example, adding a new control 1/2 way down your form will insert a new column at the end of the responses spreadsheet, and attempting to move that will create a 'ghost' column which can't be removed. Similar issues will be encountered with removing rows etc.
If the system you are working on is anything more than trivial, Google Forms are not the way to go. But if you feel it can do what you need, then Bryan P's comment from yesterday is probably the way to go :)

A wizard's logical behavior

The question I have is about the general functionality of the back button in wizards. I was thinking about the possible behaviors of this button and I couldn't find any clue which one is the right choice between these two options.
1- It should show the previous page and the changes made in the current form shouldn't be saved.
2- It should show the previous page and the changes made in the current form should be saved.
I would like to know which option you think is the correct behavior for the back button and why.
The pretty sensible Windows guideline from Microsoft is;
Preserve user selections through navigation.
For example, if the user
makes changes, clicks Back and then Next, those changes should be
preserved. Users don't expect to have to re-enter changes unless they
explicitly chose to clear them.
See UX Wizards guide.

Clear form button in HTML...do we really need this? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 11 days ago.
Improve this question
I usually add the "clear form" button to HTML forms by default. Is this button actually necessary or a holdover from another time? I have never gotten to the end of the form and thought "I screwed up, I need to reset this!".
I stopped adding those about 1997. It really bothers me when I fill out a large form and accidentially hit the Clear button. I am not really sure why they were ever used in the first place. You're right, I don't think I've ever filled out a form and said to myself, "Oh wait a minute, I think I want to start over?"
The nice thing about the reset button is that it will repopulate all form elements with their original values, not simply set them to zero or blank. So if the form was generated by server with saved data, the user makes a bunch of changes, and then realizes not only that something is wrong but that they also have no clue what the original value was, reset is VERY handy.
Also it's nice for forms with lots of numerical data, like the timesheet page I'm working on right now. There are potentially 16 fields, all with generic, somewhat meaningless numbers. If the user figures out they were looking at the wrong schedule, it's nice to just nuke it back to what the server loaded.
Having said all of that, my page does NOT include a reset button, simply because I didn't want to leave open the exact opposite of awesome it presents, which is "and I'll just click this button to save...oh shit."
What I do instead is any field can be set to 0, but any non-valid data (non-numeric, less than 0, greater than 16) will revert back to the value last entered (which is stored via js). Doesn't offer the grand sweep, but it at least lowers the amount of possible data entry errors and keeps the user from losing data over a simple mistake.
456 has a great article and link on this topic, by the way.
No, we don't need it. I usually just hit the Refresh button.
And then remember it's a #$#$## Flash website.
In what situation would you enter totally wrong information for 10+ fields before realizing it? And then, how much time does it save to clear them before starting over instead of just changing each value? It's adding a major UI element that is not only completely useless, but dangerous for 99.99% of your users so the remaining .01% saves maybe 1 second of their time.
What about one day you need to use it ?
I guess nowadays maybe there are some issues with browsers autofilling forms
for you with irrelevant information that people might want to clear.
I think instead of clearing the whole form, selecting some of them and pressing clear button would be something users would want more.
Anthony's example seems to be the only valid reason why we would add a "clear" button on forms now-a-days. It only seems relevant within a web application of some sort. I don't think general single-direction-forms will benefit much, such as collecting personal information. I couldn't tell you the the last... or for that matter, the first time I ever used a "clear" button as a USER. I can certainly give examples to when I used it as a developer, but that was before Firefox became so awesome!
So; in the end... I think it's more traditional than functional. Unless you've got a complex web application, I see no need for this extra functionality.
I often have a select box that has an "add new >>" option, whereupon the select field morphs into a text field to allow users to add new values to the field on-the-fly. I put a reset button so they can get the regular select box back.
In order to avoid the usability issue of accidentally clicking reset when they meant to click submit I put it some distance away from submit and have it in a neutral tone while the submit button is an accented color (sorta like OS X, it's got the glowing blue button and then the grey ones.)
However, I still don't really like it. I've been exploring a reset button of some sort on each select box that morphs so they can just reset that one piece.
Hmm, maybe your average IE and Firefox users may not be aware that there is a supposed "feature" called autocomplete that these browsers offer by default.
Maybe the "clear form" button is commonly provided for forms due to the chance the user has not unchecked the Remember search forms and history and the Form & Search History checkboxes, and will otherwise be confused and try to manually delete form fields...
EDIT --
And apparently there is a non-W3C-standard attribute autocomplete that can be added to input fields of a form and set to "off." There may be problems with this though, check out this stackoverflow question about it.
Just a thought to the people who can't think of any reason to have a reset form button! We have a search form at the top of our results pages, which is pre-filled with the search criteria from the previous search. Without a reset form button, the user has to either go back to the previous page, or manually clear all the form fields to do a new search. Why pre-fill the search form? So the user can keep the rest of their search parameters the same and change the location they're searching in, for example.
Edit: I just found out the reset button returns all form values to their original values. So, I'm talking more about a "clear all fields" button really.