I've created groups to bundle similar values together, e.g. product names containing specific keywords. However, product names are always changing and I don't want to have to manually update the groups with new product names.
I would like to use a calculated field which has the "CONTAINS()" function (or something similar to this functionality) in the group in order to have it updated when new values are found. How can this be done?
Related
We have two teams working on system related issues and my Access database has one table for each teams open issues. I have created a query that matches issues from each list based on the system name. The query is returning potential matches correctly.
From there, I need to be able to review each "match" and select yes or no on a dropdown to confirm if both teams are working the same issue in order to quickly and easily reduce redundancies. I would prefer to review each result in a form format and have figured out how to add a dropdown box with the yes/no options; however, once I've validated each item, I'd like to filter the results down to only show the items that have been designated as "yes".
That's where I'm stuck. The form is not currently saving the results, including the dropdown info, to a table from what I can see.
How can I get the form to load to a table (or query) in order to filter out the "no" responses?
Try converting your query to an append query or an update query. Create a new table that this query adds data to, and in that table create a new field called "YesNo" or something like that. Put that new field from your table as a control source for your dropdown and should add a value in the "YesNo" field in your new table based on what you select. I'm not sure what value will be added to the table, I did something similar with a check box, when it's clicked it adds a "-1" and when it's unclicked, it adds a 0. Then I run a report that selects records based on the value in that field. I'm assuming the dropdown would work in a similar way but not a 100% sure. Hope I understood your issue, I'm no expert at access but I ran into the opposite issue recently where I didn't want the form to save the results.
This is complicated and difficult to explain, but here it goes. I have created a db that works just fine. It is a time saver, but not efficient for the user. I have a form for the merchandise where the user selects a paper type from a combobox. They are presented with two choices. They must also select a print size from another combobox. They are presented with 5 choices. I have VBA code that creates a SKU number based on these selections.
An art piece can use both paper types and be available in all 5 sizes. What I am trying to figure out is how I can offer all the possible choices on this form, allow the user to select options for that piece. As an example, the user chooses both paper types and all print sizes. This would create 10 SKU numbers for one art piece. Below is a copy of the form in it's current view:
Is this possible to do from one form? If so, how can this be accomplished in the most efficient way? I feel that it can. In VBA, this would be an IF nest nightmare, especially when concatenating the SKU variables. Either Select statements or another method that I am unaware of, could be the solution.
Thanks in advance for any and all suggestions and assistance.
EDIT: I hope this helps clarify. I would prefer to use this form
to complete the task. The checkboxes are not in an option group so they could all be checked if the user requires it. For the purposes of this question, let's assume the user has checked all the boxes. This would equal 10 total combinations.
I run this sub to generate a SKU based on the paper type and the print size:
Private Function UpdateArtwork()
Me.MerchandiseSKU = Me.cboArtworkID_A5A.Column(5) & _
Me.cboPrintTypeID_A5A.Column(2) & Me.cboPaperTypeID_A5A.Column(0) & _
Format(Me.cboPrintSizeID_A5A.Column(0), "00")
Call UpdateArtworkPic
End Function
I am trying to figure out how to write the code for the new form that allows all 10 SKU numbers to be generated and create 10 new records for Artwork_ID (Artwork table).
I think that the best way of doing this would be to create a new table, called tblArtworkSKU, which has the following fields:
ArtworkSKU_ID - Autonumber, primary key;
Artwork_ID - number, foreign key from the Artwork table;
PrintSize_ID - foreign key from the PrintSize table;
PrintType_ID - foreign key from the PrintType table;
ArtworkSKU - text.
You would then create a small continuous form based on this table, with PrintSize_ID and PrintType_ID selected through combo boxes. When you place this form onto the main form that you have, Access should automatically let you join on Artwork_ID to create a one-to-many relationship.
You could then use the AfterUpdate events of each combo box to create the SKU.
Regards,
I'm a learning developer building a Product & Inventory tracking platform for the company I work at and my Rails application has a Products table. Within the Products table are a bunch of basic entries, such as SKU, Description, UPC, Manufacturer, etc.
What I want to do is have an option within the Create page to insert custom parameters into something like a text_area to create Product specific entries, for example if I have only a small set of products that would benefit from a Voltage column and don't want to flood my migration with a bunch of lesser used options. What I'm picturing:
'Voltage|120 Volts'
'Housing Material|Steel'
'Duct Size|4"'
and then these could be their own rows in the Product's Show page.
Is anybody aware of a Gem or template that already accomplishes this, or would I need to dive in the deep end myself? I fear something like this is out of my skillset currently.
You can have one hstore column in the migration which will allow you to store multiple dynamic values in the single column as a hash.
You can read more about hstore from here.
I used hstore to store dynamic variants of product in the table.
Is it possible to add references to a column different from the id column?
Usually when a relationship between two models (Model1 and Model2) is created, the use of model1:references and model2:references for the creation of the Relationship model automatically adds a model1_id and model2_id column (along with an index and a foreign key reference) for use in the model1/model2 association:
rails generate Relationship model1:references model2:references
Say for instance Model1 = Teacher and Model2 = Pupil.
Suppose that Model2's records (pupils' records) are updated every now and then with a rake task: the values of its attributes (for instance name and school_credits) would change, preserving id and ranking (1 to 100).
Associate a teacher with a pupil_id would not have much sense.
Each teacher should be instead associated with his/her pupils' names using as a foreign key reference the attribute pupil.name instead of pupil.id.
Is that possible?
What options can I add to the command rails generate Relationship or what reference am I supposed to add to have this result?
Yes, you can. Check sections on foreign_key and primary_key from the following link. I don't use generator so I cannot comment on which options to pass into generator, but you just need to ensure that the column to be used as foreign key exists in your table and that you assign appropriate foreign_key in the model files.
But why do you need it? I don't understand what kind of use case you might have that would require you to keep id and ranking identical.
I'm working on a RoR project for work, and I'm having trouble deciding about the design of my relational database tables.
Consider the following:
I've got a model Product, each product has a unique name.
I've also got a model called Shop, each shop has many products.
Finally, I have an Order model, Order is obviously connected to the shop which the order has been made from, and to the list of products which were ordered.
I would like to keep default values (e.g. default price) for each product, and I'd like each Shop to be able to overwrite those default values if needed, but can't really decide on the strategy of doing so.
What I have in mind is as follows:
Create a Product table, which will include the product name, and also, columns to keep the product's default values (e.g. price)
Create a Shop table, which will include everything which has to do with the shop.
Create a Product_To_Shop table, which will hold the product quantity for that exact shop, and will hold additional columns, which match the Product default values columns which will let the shop overwrite the default product related values.
Now when I'd like to get the price for a specific order, i'll first check out the Product_To_Shop table, for the related Product and Shop, and check the Price field for the matching row, and in case it's not set to a value (nil), head to the Product table and fetch the default price value for the relevant product.
The whole thing looks a bit complex for a task which seems a bit more trivial.
I was wondering if anyone ever had to deal with keeping default values in the database like that and has a more elegant solution, since this one seems like an overkill...
you can do the following
Create a Products table, which will include the products data ( but no prices).
Create a Shops table, which will include the shops data.
Create a Prices table, which will include Product_id, Shop_id, Price.
Shop_id defaulted to null which will indicate your default price
When you need the price get the one matching shop_id or isnull