In Foundry Workshop, is it possible to reset a scenario when a user navigates away from a Workshop tab? - palantir-foundry

I've created a scenario in Foundry Workshop, and would like to set it up so that it resets whenever a user changes their active Workshop tab. Is it possible to accomplish this within scenario variables?

If the scenario array variable is produced from a scenario object set, then changing the object set should reset it. See the relevant documentation for this at https://www.palantir.com/docs/foundry/workshop/scenarios-save/ .
If you have a single dynamic scenario that you'd like to reset, then you can use the "Reset variable" event to reset it to its default value.

Related

How can I set a variable in my workshop module via URL?

I currently have a workshop module that allows users to view a set of objects and then filter them according to a filter widget.
I would like my users to be able to set which filters are applied via URL such that they can quickly apply their default filters.
How can I achieve this?
Create a variable for each filter you would like the user to be able to apply via URL.
Promote the variable so that it can be update via the URL.
Update the filter output to use the variables you created above.
In addition to using the promoted variables described in the answer above, specifically for the case of saving and re-using Filter state, you can enable the State Saving feature for users of your app, which allows them to snapshot and save specific application state as a separate Foundry resource. You can then share the link or bookmark or re-open from a folder without worrying about the "wiring" of variables and URL parameters.

In Palantir Foundry's Workshop, how do I clear the default Workshop variable values I saved earlier?

Palantir Foundry's Workshop allows us to save default values for variables using the "save and publish with current variable values as default" button. Can these default values be cleared out or reset?
If you want just to change the default to something else, you can choose another option and save with current variables - that will not clear the default, just change it.
To reset the default:
Go to variables
Choose the dependency graph
Search for the variable
Open Debugger on the top right
Clear the value
Save again with current variables (which will clear the default)
This is useful if you saved a dropdown list to a value for consistent debugging while developing, and now want to release with the first item in the list, which will chosen by default (if it is clear).
Note: Simply using Save and publish will still retain the older default value, so above steps are necessary.

Why can I ask for a password when using the su command problem when using GCE?

I am awkward because I am trying a translation tool, but please forgive me
As a problem su command is no longer available
I think that the same account was used as the cause and that access was done simultaneously from different terminals
Please tell me how to resolve
I had the same problem today. You need to enable oslogin by adding the necessary meta data to your Instance (likely your project as well).
Instructions below. Solved it for me. Hope it helps
https://cloud.google.com/compute/docs/instances/managing-instance-access#enable_oslogin
To set enable-oslogin in project-wide metadata so that it applies to all of the instances in your project:
Go to the Metadata page.
Click Edit.
Add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to disable the feature.
Click Save to apply the changes.
To Set enable-oslogin in metadata of an existing instance:
Go to the VM instances page.
Click the name of the instance on which you want to set the metadata value.
At the top of the instance details page, click Edit to edit the instance settings.
Under Custom metadata, add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to exclude the instance from the feature.
At the bottom of the instance details page, click Save to apply your changes to the instance.
To Set enable-oslogin in instance metadata when you create an instance:
In the GCP Console, go to the VM Instances page.
Click Create instance.
On the Create a new instance page, fill in the desired properties for your instance.
In the Metadata section, add a metadata entry where the key is enable-oslogin and the value is TRUE. Alternatively, set the value to FALSE to exclude the instance from the feature.
Click Create to create the instance.

MS Access: Allow user to update data from form, but not from table

I want to allow user to update data from form, but not from direct table. I added Before Change event on table, and raising error if the user group is 'basic'. This is working as expected if I enter data in table. But, it is also raising error even if saving data from form. Can anyone help me to resolve this issue?
Thanks in advance!
In general the way to deal with permissions in Access is to only ever show your users the forms; they should never directly interact with a table or query. So instead of adding Before Change code to your table, you instead want to hide the table.
The things you need are in the Current Database section of the Access options. For this example I'll assume you just have the one form, but the same applies if you have many forms and a "Home" form.
Use the "Display Form" dropdown to select the form you want the user to see when they open the application.
Un-check "Use Access Special Keys" to prevent keyboard shortcuts showing objects you don't want shown.
Un-check "Display Navigation Pane" to hide the object list.
Un-check "Allow Full Menus" to prevent users from creating new objects (or use other database development functions)
With this done, the user will see only the form interface you selected and the basic data entry toolbar.
Note that when you want to make changes to the file as a developer you must hold down Shift when opening the application, which will display the navigation pane etc. Of course, any user who knows about the Shift override could do the same. Which is why distributing in a compiled accde, which cannot be unlocked, is a good idea. But you need to set up the application using the above options before that matters.

How to do binding to Datacontext in different page

i have a textblock in mainpage.xaml. I have another page which has a textblock whose value is bound to observable collection and its value changes depending on user events on that page. How can i bind the textblock value in this other page to textblock value in mainpage.xaml?
Can anybody please guide me to any resources or examples which may explain how to do this or any workaround?
Well, you can't directly bind properties of two controls on different pages since they aren't displayed at the same time. You'll need to store your state elsewhere and retrieve the values from there.
Basically you'll need to store your application state somewhere, either inside the App class or singleton/static properties. Alternativelly you could persist the state between pages (to a file or setting) and retrieve it again when loading the page.
In any case you should bind the controls in both pages to a view model which would retrieve the values from the application state or itself be stored there. This way the values set from one page will reflect on the other one.
Depending on how you navigate between pages you might be able to take advantage of parameters as well (Frame.Navigate(typeof(OtherPage), parameter)) but you're limited to tranferring only basic types this way, so you'll be able to transfer ids but not complete objects.