How can I prompt a user to confirm before submitting an Action? - palantir-foundry

I am trying to configure an action in the ontology manager application. This action edits objects that are currently used in production, so we need to make sure that users to not accidentally submit actions. As such, I would like to configure an extra pop up that will ask the user for explicit confirmation before the action submission goes through. Is this possible? Ideally it would look something like the confirmation popup that is shown by Foundry when you try to delete a dataset (see screenshot below).

Within the action form you could add another parameter asking the user to confirm with a specific word (e.g. 'I Acknowledge') that they really want to make those changes. I drafted this up in a Workshop app.

Related

How do I create a "Details" button in Microsoft Access?

I'm new to using Microsoft Access, and I'm having trouble restricting a report's output to only the single row I'm interested in.
My organization has a relatively small client list, where a little of their information is used frequently (like their name and account status), and much is used infrequently but still important (like home phone and incident reports).
The way I want to display this information is to have a form that shows a list of our active clients with their most common information, and then has a "Details" button at the end of the client info for when people need to see the rest of that client's information.
So far, I've successfully made a form that links to an "ActiveClients_rpt" report that shows the most common info, and I've made another form that links to a "ClientDetails_rpt" report that shows all the detailed info. My problem is that when I try to restrict the results in the Client Details report by the user input in the Active Clients form, either I have to use a very unaesthetic option (like an ugly combo box that replicates the list of names the user can already see), or (if I try to do something like add a button inside a report) the form sends me the information of every client's detailed info, when I only want the info of the one client.
Is there some way I can use a report (or some other option) to tell Access to only pull information from the row in a list the button is located on? I've tried doing things like making an embedded macro using the OpenForm command to open my ClientDetails_form form with [Forms]![ClientDetails_form]![ID] or [Forms]![ClientDetails_form]![ID]=[Me].[ID] as a Where Condition (where ID is the client's ID #), but everything I've tried has either resulted in an error or not restricted the report like I want it to.
This is pretty complicated without seeing your actual database, but I did a video on something similar that might help here https://youtu.be/nNUjmH72OfI. You basically set a click event in the 'Event' tab of the Properties window while your 'Detail' button is selected (in form design view). You click on the builder button (button with three dots) and either use the Macro Builder or the Code Builder to type out the VBA. The Macro Builder is the simplest way in this case.
That's pretty vague, I admit. But hopefully the video helps.

Issue with Gmail addon needing dynamic auth url

We are creating a Gmail add-on that integrates with a CRM product. The product is single-tenant and every client has their own site path under our domain. Each client also has their own path to authorize with, e.g. https://example.com/siteA/oauth/authorize.
When setting up the custom auth screens, it looks like we are expected to know the url to assign to a click event on the auth button.
authButton2 = CardService.newTextButton().setText('Begin Authorization!')
.setAuthorizationAction(CardService.newAuthorizationAction()
.setAuthorizationUrl(authurl));
I would like to have some user input before this point. I was playing with an input field where the user could type their site name an then click the authorize button although I was not able to overwrite the original authurl supplied to the setAuthorizationUrl method.
Ideally it would be nice if the add-ons had a way to store some one-time input (like "site name" in this example) so we would not have to ask again, but I have not found anything like this.
This seems like we need a central auth endpoint but am trying to avoid this.
Anyone have any experience with this or any ideas?
Just build the authorization button using the proper url after you get it from the user input.
You can't modify that button once you create it. Rather than modify it, just create the button after you receive the url and reload that card. Or put the authorization button a new card that you push to the top once you receive user input on the auth url.

Spreadsheet Form

Can we create a spreadsheet form and open it when the user when user logs in ?
I need a form which will record the attendance of the employee when He/She logs in . Also i would like to validate the code so that it must be shown only at first login.
Thanks in advance
What you are asking to do is not possible unless you were to authenticate users yourself, then pass that along to google. Nonetheless, you would still have to train your users to login on your special page, and they could circumvent the form by logging into google directly. If you are looking for login history, then the reporting API, Domain Management Panel or FlashPanel might provide the kind of report for which you search.

Passing data from one web-page to other page, how to do this?

Suppose I am going to create a web page with two box, for entering the user id and user password respectively. And then once i click the submit button, it will check with the database in background whether this user exist. If it matches anyone in the database, the user id and user password will be forwarded to the other page, at the same time it will redirect to that user's main page.
Can I just use servlet to complete this task?
I found there is request.Dispatcher API but is it enough for the task?
String name = "Tom"
request.setAttribute("name",name);
RequestDispatcher dis = request.getRequestDispatcher
("Servlet2");
request.Forward(request,response);
in second servlet file
request.getAttribute("name");
//this line will display "Tom"
One more question to ask, how about clicking a link (INSTEAD OF BUTTON) to pass some data and redirect to other servlet pages? Any idea? Many thanks for your reply.
Yes, you can use a servlet for this. Whether the dispatcher is enough or not depends on the concrete functional requirements which are not fully clear from your question. The canonical approach, however, is to store the logged-in user in the session scope instead of in the request scope. Otherwise the user has to login everytime the user want to visit a restricted page.
Also, you normally would like to send a redirect after the login succeeds. This way the new URL get reflected in browser's address bar. Also this way pressing F5 afterwards won't cause any possible surprises. Forwarding from one to another servlet is at its own also somewhat a design smell. Including would have been reasonable, but forwarding not. As said, send a redirect instead.
As to using a link to submit a form, just execute JS form.submit() during the click event.
<form id="login">
...
login
</form>
An alternative is to style the button to look like a link with a little help of CSS. This way it'll also work on clients who have JS disabled (for example, the handheld users).

Avoid problems in key-controlled HTML forms if key is permanently pressed

I created a simple web application with two pages. For a better usability I make it key-controlled, which leads to a problem. This is the workflow:
A form in which pressing ENTER key (or a button) executes the submit. This starts a database query.
The second page then displays the query result; a "Back to start" button calls the form again. The form is refilled with the same values again. The button can also be activated by ENTER.
The problem occurs when a user permanently press the ENTER key. Then dozens of querys are executed and this nearly kills the application.
Any ideas how to handle this without losing comfort? Thx
If you are using any server-side language like PHP or similar, you should add a flag to the user session which indicates whether the form has been submitted previously. You can also count the number of submits if you want the form to be submitted multiple times but not infinite.
If that doesn't fit your needs, please describe your execution environment more precisely.