How to create a random name picker? Action Script - actionscript-3

I want to be able to create a random name selector, that allows you to input the names you want and then it randomly chooses one of these. How would I go about doing this?

Related

How to make the names stored in a list unique?

I created a variable that will prompt users to input their names 20x, the all those names will be appended into an empty list that I created, but I need a function that will constant check each name that was entered and compare it to other names in the list in order to ensure that it is unique, if similarity is found, the function should automatically add a unique number to that name to make it unique. The function should also enable users to enter not more than 20 characters and not less than 3 characters for their names. Id really appreciate it if someone can help me with this problem, thanks in advance. Also I would like it to be done with python programming language.
Here is an example of how i have tried to make the validation
CLICK THE LINK TO SEE MY EXAMPLE

MS Access - searching for better method to create and edit records

I have made a database that I use at work for tracking tags that get signed out. The way I currently have it is I created a table that has 100 records manually entered already. Field Name "TagNumber" 1 to 100. There are several other fields for every record that is currently blank.
A user will have access to a form that they will select a tag number from the "TagNumber" dropdown list. Doing this will allow them to fill in the other fields with the correct info for that tag. When finished they will click a save and exit button that will modify that record they just put the info in for. It will also update a Field named "SignedOut" it is a data type Yes/No field. Once the user has signed out that tag number it will no longer show up on the dropdown list when someone else goes to sign out a tag.
On the same form there is a "SignIn" dropdown list that only shows the tags that are checked yes in the "SignedOut" Field. When a user selects a tag to be signed they enter their name and date and click save and exit. Clicking the save and exit button will run a macro that copies all the data on that single record to another table for tracking purposes. It also sets all the fields back to blank except the "TagNumber" field. This allows another user to sign out that tag again.
examples of my tables:
Nothing signed out yet
Tag 4 signed out
Now my issue I am running into is If I provide this to another section they have different tag numbers and I don't want to have to go to the table and physically change every tag number. Is there a way I can auto populate the list with different tag numbers? or is there a way I should be doing this that is completely different from the way I am doing it?
Thanks for any info you can provide.

How to create a custom reuseable HTML template populated with data from database?

I have a database containing many records - let's say its a people database and the columns contain Name, Surname, Age, FreeText.
I want that this data to be displayed in a list on my website. Each item in the list should contain the database' row data.
In detail, each list item should be a custom HTML div consisting e.g. of 2 columns, where in the first column the Surname and the Name should be displayed in the first row, the age in the second. In the second column there should be the free text.
There should also be a onClick listener on this item.
I am a Wordpress Beginner, I have no idea how to achieve this. I think the general approach has to be: Get records from DB, create the items dynamically, put the into the list, and display the list on the page.
I purchased the Avada theme for the design, but this kind of functionality does not seem to be included.
Any hints where to start? Do I have to create dynamic php files, and if yes, how? With javascript? Or are there Plugins available which I can use?
i find this plugin for you try this link:
https://wordpress.org/plugins/participants-database/
This plugin offers all the functionality needed to build and maintain a database of people or anything you want. The database is fully configurable, allowing you to define all the fields of information you want to store for each record. The records can be entered individually in the WordPress admin section, imported with a CSV file, or let the individuals themselves create their own record. Display lists of records can be sorted and filtered by any field, and the result exported as a CSV file.

Lookup tables displaying number instead of text [duplicate]

I am trying to create a report putting a field called contact which has the name of a person. This name is linked directly to another table where I keep all the contacts.
For some strange reason, when I include this name (which in query view displays as the name of the contact), instead of the name appearing, the unique ID number is shown on my report.
As mentioned in the article cited in the above comment, you can use a Combo Box control on your report to do the lookup for you. To see how this can be done, create a new report based on the table containing the lookup field, then drag and drop that field onto the report. That will create a Combo Box control with properties that look something like this:
Row Source: SELECT [Clients].[ID], [Clients].[LastName] FROM Clients;
Bound Column: 1
Column Count: 2
Column Widths: 0";1"
You could use a similar Combo Box control on your actual report to display the client's name rather than their numeric ID value.
Another alternative would be to change the Control Source of the report's Text Box control to have it do a DLookUp() on the table. If the lookup field is named [client] then changing the Control Source of the Text Box to something like
=DLookUp("LastName","Clients","ID=" & [client])
would also work.
I wanted to add to the great answer by Gord:
When using a "web" database (started in Access 2007 I think), you cannot change a report's fields to ComboBox style, nor can you use DLookUp(). (web databases lack a ton of features)
The workaround for this, if you want to create a Web-Report that uses lookup fields, is to create a Web-Query first based on your Web-Table (all the Web-* stuff has a www planet icon over the logo, if you create a new Web-DB in Access 2007+ you'll see what I mean)
So, instead of Table -> Report, you'll have to do W-Table -> W-Query -> W-Report.
Then, the only thing you need to customize to get the data right is the W-Query. Start by trying to reproduce the look in the query to match what you want users to see in the report. Note that here in the query, lookups will work fine (instead of the unique ID's, you get field names like you want). However, this will not carry over to the report. To do that, you gotta get the actual text field name you want into the query:
You should already have one table in your query; start by adding the table that your first lookup field points to. For example, the table I want to print is called Stock_Boards, and it has a lookup field called PCBID_lookup that points to the table Stock_PCBs.
Since you're using lookup fields, there should already be a relationship line between the two tables when you add the second one. If there isn't, something has gone horribly wrong.
Now, see how that line connects two fields on the two different tables? For example, I've got my PCBID_lookup field on my Stock_Boards table, which connects to the ID field on my Stock_PCBs table. If I created a report from this now, PCBID_lookup would be a number, a number that correlates to the ID of a record on Stock_PCBs.
To fix it, I will add the name field I want to show up on the report. In my example, that happens to be a Part Number, rather than the ID. I add the PartNumber field from my Stock_PCBs table to the query, and remove the PCBID_lookup field of the Stock_Boards table from my query.
Since PartNumber is what I want to show up on my report, it effectively replaces the original field (PCBID_lookup)
Repeat for all lookup fields you want in your report.
I had 1 more: I removed the Status field of the Stock_Boards table (which was an ID/Lookup) and added the 'Status' field from the Status table (which was the actual text name)
When finished, your query should look exactly how you want the data to appear, without any special tricks or asking Access to do something unnatural. Save your query, and create a web-report from it. Done!

How to look up values from a table in Access

I have an Access database that is used to store basic info in a table such as first and last name. How would I go about adding the functionality to lookup by last name?
Is there a way to type in the last name and then hit like F12 or something like this? Can someone please point me in the right direction or provide me a link?
SELECT tblPatient.LName AS [Last], tblPatient.FName AS [First]
FROM tblPatient
WHERE (((tblPatient.LName)=[Enter Last Name]));
How do I tie this into my form now?
I'd suggest you create a form, with a textbox 'search' at the top, then either a listbox or subform below to display results.
The listbox record source would be:
SELECT tblPatient.LName, tblPatient.FName
FROM tblPatient
WHERE tblPatient.LName LIKE Forms!myForm!search & '*';
You can either add a Search button, which requeries the listbox, or do the requery via the Change event of the search textbox. The later may be slow if you have a large number of records; if that's the case, you could check that at least 3 (?) characters have been entered before calling the requery.
You just need to create a query in which you put =[?] as the "last name" value.
When you open that view, you'll be asked to type in a lookup value for that field.
Not sure if this is what you are trying to archieve, though...
This is probably a bit overkill for what you want to do, but I assume that you want to perform a search by last name. You should be able to glean the information you need from this article:
Build a search criteria form
http://www.everythingaccess.com/tutorials.asp?ID=Build-a-search-criteria-form
You can create queries in Access if the user you're targeting with the searchability has Access themselves.
From the main Access UI (assuming Access 2007), go to the Create tab and then select the "Query Wizard." Here is an article on the subject.
Otherwise you can create a program and connect to the MDB/ACCDB file running the query programmatically.
Seeing you wish to look up a name and populate the form based on the name selected, I suggest you need a combobox. There is even a wizard for doing exactly what you want. To start, you will need a form bound to a table or query, that is a form with a Record Source.
Add a combobox to your form
Select :
Find a record on my form based on the value I select in my combobox
Select the ID (primary key), Last and First name fields.
Access will display an example, suggesting that you hide the Key (id) column. Accept this.
Choose a name and finish.
There are a few other small things that could be done for neatness, but you will end up with a form that find the record you want. In addition, the combo will autocomplete if you type in a few letter.
If this is an mde, which your subsequent post seems to suggest it is, there is little you can do wuth out the original file. However, you could try opening the database while keeping the shift key held down and see if that allows you to edit. If you cannot get the original and the shift does not work, you could try rescuing the data, if it, too, is stored in this file.