There are a few topics that I have found while searching for an answer to this, but nothing that specifically helps my situation. Here's what I need to do and some background.
Web application has a field called "Requested by" that automatically inputs the logged in users name from Active Directory. This cannot be edited.
User selects a store location from the first list, this location is where the requested user will be setup for.
Second list needs to then populate with a list of potential approvers by first seeing which store was selected, then grabbing a list of names from an Active Directory group called "Store Managers"
Example
Bob Jones is requesting a new logon for Sally Smith who will work at Store 1.
Bob selects "Store 1" from the first dropdown list
List 2 populates a list of approvers who are in "Store 1" group AND "Store Managers" group.
Can someone please tell me where to start on this! Any help is very much appreciated!!
Within the function that is called whenever the first drop-down menu changed, ie. a new value has been selected (such as selecting a store), you can have a simple if-else structure that, depending on the newly selected drop-down menu item, checks for any valid values within your Active Directory.
That is as specific as I can be, seeing as you haven't posted any code along with your question.
Related
I got this idea to create something quite simple as an exercise in Firebase, I want to create a simple App with a couple of views: A "Homepage" / Splash screen which navigates to a couple of different views:
A "friends" list where the user can add other users and monitor their online / offline status as well as send them an invite to a selected group
An "invites" screen monitoring incoming invites
A "groups" list where the user can create, delete and select group(s)
And finally a collaborative list shared between members of the selected group.
A quick use-case:
A user "User1" opens the app and creates a group "TestGroup" and click it to select it as the active group
The user then heads to the friends screen, here they add a friends "User2" and click their name in the list, a popup arrears asking them to confirm whether they want to invite "User2" to join the active group "TestGroup"
"User2" finds an invite on his "invites" screen which he click to accept
Now "User1" and "User2" can both read and write to the aforementioned collaborative TableView list which changes depending on which "group" is active / selected.
Is this something that's possible? I've gone through a few tutorials regarding basic Firebase setup like this: https://www.raywenderlich.com/187417/firebase-tutorial-getting-started-3 which suit my needs quite well, but I don't know where to get started about the "collaborative" list.
Yes it is possible. Structure can be like this:
-MembersForGroups //here you have the groups and the members that are on each group, so when the user chooses a group the members are easily displayed
--Group1ID
---member1ID:true //when the user creates a group, the groupID is create and their user id is automatially added as member
---member2ID:true
-Colabsheets //here you have all the colab sheets with each group containing the posts that users have made.
--Group1ID // Give the sheet the same ID as the group so when you choose a group you can easily load the colab sheet.
---Post1
senderid:""
message:""
timestamp:""
---Post2 ....
I'm looking to create a report with similar that has a checkbox next to each row. Each row has some fields that are editable (such as comments). What I'd like is to give the user the ability to check off which rows he/she would like to update by selecting the checkbox next to that row. Then I'd have a save button at the bottom of the form that only updates the rows that have a check box active next to it.
I'm pretty new to rails and web programming in general so any advice/direction you might be able to give me should prove helpful.
A popular way to achieve this is to :
1- All your checkboxes should share the same name.
2- All your checkboxes' values should be the ID of the row/object
3- When you POST the form, only the checked checkboxes are in the POST data. Retrieve those IDS and only update these objects.
For example, your checkbox should be something like :
<%= check_box_tag "row_ids[]", row.id, false, :id => "row_#{row.id}" %>
Then, in your controller :
Row.find(params[:row_ids]).each do |row|
# do whatever you want
end
Well you can do this, but it adds more work for the user: they have to check off multiple checkboxes before hitting Update. It be nicer if they just hit Update and it worked.
The basic idea is you want the user to just click Update and your code only updates records that changed.
What you can do is store (in a hidden field tag) the ID of each row's record. Then when you update, you loop through all rows and you grab (based on the ID stored in the hidden field) the record from the database. Let's say only Comments were editable. Then you can check to see if the comments have actually been changed (like with a simple string comparison) and if they have, update it. If more things are editable, then you can check them too before deciding if you need to update or not.
That is a high level description, but let me know if you want some more implementation details.
in our Company we have a Sharepoint 2007 Server which we are using to keep track of our cars.
What I try to achieve is to have a aspx page where you can select a car of the cars list and then click "request". If you did that the page must switch to another text saying something like "car request in progress" (and of course hide this car in the cars list if the next person enters this page) and send an email to someone which contains two buttons: "accept" "decline". If he clicks "decline" the cars status has to be set to available again so someone else can do a request for this car again. if he clicks "accept" another person gets an email telling him that person1 requested this car and this has been approved by person2. this emails are easy to create using workflows which are waiting for the status to change but how can i create a link which changes a cars statusfield in the cars list and what code do i need in the aspx request page?
Thanks in advance!
MemphiZ
Make a link that, when clicked, will run the appropriate action on the users behalf. If you are using workflows, this is as "simple" as changing the items property and letting the item-change event be handled. Make sure to avoid cyclic changes.
This can be done trivially by encoding the items GUID (and perhaps list and action and whatever else you want) in the URL; the GUID can be used with the SharePoint Object Model for the lookup.
Perhaps the above can be done using SPD without a separate/"code" ASPX, but I don't touch that pile of "fun".
Edit for comment:
In my scenario we just encoded the link as http://foo.com/whatever.aspx?id={THEGUID}. The aspx handler just read the query parameters. Item editing ability used standard SharePoint list permissions. Double-submissions were rejected because after the link is handled the item modified to be in a new state which does not accept said link-action (thus clicking the link again simply resulted in no-operations). Working out a total state-diagram before starting work can save lots of time.
I'm looking for an enchanced edit component that allow users to input multiple tokens (items) manually separated by some symbol, or to select them from another source.
It's something like "TO" field in outlook or facebook that allow you to input multiple recipients.
Can anyone suggest any solution?
The way we sort of do it is to use an normal button edit box and when the user clicks the button we present a separate form (which can be made to look like a drop down box if you like) with a checklist or listview with checkboxes enabled or similar. The user selects any number of the items then when the form closes we take the list of selected items and present them in the edit as a comma or semi-colon separated list. The edit itself is read-only so all interaction goes through the separate form.
But - I really don't like the whole approach (for our app) as it doesn't look good when you have many selected items and I'm looking to find a better way of showing the selection! I suppose one option is to use a read-only memo with scrollbars to show the items.
TMS has some nice components, one of which is the TCheckListEdit which might be of use.
So, basically my 'index' action is a long list of elements output as a table with Rails, each one has a checkbox next to it. These elements are items in a catalog that will be line-items in a quote.
A user can select as many checkboxes as they like, then click a button that says "Create a new Quote" it'll take the items they checked and clone them into a new table so they can edit them as apart of the quote.
The issue I'm having is that when the list is really long, say 6000 records it’s a n awfully long list to load, so I want pagination, BUT! then my checkboxes won’t work, because they will go away if the user changes pages.
Additionally the user has no way of going back to this page to "add" more items to the quote.
My first thought was to create a new element right when they browse to this "index page and essentially have the user editing the quote from the get go"
Any ideas on this implementation? I'm a little stuck on how to get started implementing this.
This is a classic shopping cart type problem. You might want to read up on implementing those in Rails with sessions. Simple example is to use the user's session. You can either create a class to encapsulate the logic, or just use a hash or array to hold the ids that are checked. So when the user clicks on "Start New Quote" you can set a var in their session to blank like:
session[:new_quote_items] = []
Then when they check off items you can have a link to add them to the quote. You can then place those ids into the array. On page display of the possible quote items you can show the user which ones are check and have then add/remove IDs from this list. Then when the user is done they can click on a finish link which will take the ids from the session and create the quote as you have now.
This question is similar to yours and covers your first problem. Pagination.
In addition to that, clever use of accepts_nested_attributes_for on the join model will allow you to simplify addition of elements to either existing or new quotes.
Sorry I've got no code for you right now, but here is the general idea:
Generate a list of QuoteItems that is is the union of the set of existing quote items for this quote, and quote items built for the current quote from items not part of the current quote.
Give that list to fields_for and set up each field_for region so that it passes the item_id as a hidden value and contain a checkboxes, such that they modify the :_delete field, with default value evaluating true, and checked value equating to false.