I'm not sure if there is a way to get this to work, but I've got my fingers crossed:
I have a database which is keeping track of Inventory for a school district. Part of what is being tracked is the special (non image) software that is installed on a device. No computer can have more than 5 extra software, so I have 5 fields, Software1 - 5 which all lookup to a Software table that contains the possible software to choose from.
What my client wants, is to be able to find all devices that have a certain software installed. Of course, Access Web Apps do this almost without having to ask, by creating a popup view when clicking on a lookup field. The problem I have is that because I have 5 separate fields, and a particular software title could be in any one of those 5 fields, I have no way of finding ALL the devices that have that software in ANY of the 5 fields. I can only find the devices with that software in the SAME field that was clicked on.
For example, each device has a Model number - something also related to another table. My popup view for the Model has a subview which links the (parent) ID field from the Model table, to the (child) Model field in the Inventory table. This way, when a Model is clicked, in the subview I see all devices of that same model.
But, for the Software fields, when I link the parent ID field from Software, I can only relate ONE child field to the view, meaning only one of the 5 Software fields in the Inventory table. So if XYZ Software is in the Software1 field, and is clicked on, it won't find any devices that have XYZ Software in the Software2, 3, 4, or 5 fields.
I have "hacked" it into a fairly ugly looking thing where I use the same popup for each of the 5 fields. The popup actually has 5 separate subviews, each linked with one of the 5 child Software fields (so you could have 2 devices in the first subview that have XYZ Software in Software1, and then see another device in the second subview that has XYZ Software in Software2, etc). But this looks really bad and I would like to do it a better, more cohesive way. Every idea I come up with (use a query, use a subview within a subview, etc.) still gets snagged when I have to link that subview to only one child field.
I wish the web apps could have multi-value lists like desktop databases, but alas, not at this time. I would love to share a screenshot of my current popup view so it's explained a little better, but I don't have enough rep at this point, so please excuse my lowly-ness.
Does anyone have any ideas on how to get around this situation? Is there a way to set up a query for the subview that I'm missing? Or a way to hack it some other way? I'm all ears for suggestions!
Thanks in advance,
~SetsunaMH
I know it's been almost a year since I asked this, but since no one ever offered an answer, I figured it would be good to post what I did as a workaround.
I had no way to build a query that would search all 5 fields for the software to display them - every attempt I made would not work. What I wound up doing was what I mentioned in my original post: creating a special popup view, with 5 sub-views: each one an individual query for each of the 5 software fields. Clunky, and kind-of a pain, but it worked for my client (the database was a stop-gap until they could integrate another system, so it didn't need to be 100% perfect anyway).
Moral of the story: I hope Web Apps will have multi-value lists in the future... :)
In my opinion, your table structure is flawed.
You should have 3 tables.
One for devices ("tblDevices"), another for Software ("tblSoftware") another "tblJoin" to establish a many-to-many relationship.
You need this because it is entirely possible to install the same software on multiple devices.
tblDevices
DevID - AutoNumber - PK
Model - Text
(add other fields as necessary to describe Device-related data.)
tblSoftware
SWID - AutoNumber - PK
Software - Text (ONE field here, not FIVE)
(add other fields as necessary to describe Software-related data.)
tblJoin
JoinID - AutoNumber - PK
DevID - Whole Number
SWID - Whole Number
(You CAN add additional fields here if you feel the need to, but I'd try to avoid doing so if possible.)
]2
I know the screenshots are sadly lacking in way of explaining.
I have tried something new and have posted a thread in the Microsoft Community, asking for someone to verify that my plan to upload a SHAREABLE app will work.
http://answers.microsoft.com/en-us/msoffice/forum/msoffice_sharepoint/how-to-publicly-share-an-access-2016-sharepoint/607c9f4e-476a-4849-9207-0c7c7f5b2924?tm=1472316250163
Related
I would like to provide users with points when they do a certain thing. For example:
adding article
adding question
answering question
liking article
etc.
Some of them can have conditions like there are only points for first 3 articles a day, but I think I will handle this directly in my code base.
The problem is what would be a good database design to handle this? I think of 3 tables.
user_activities - in this table I will store event types (I use
laravel so it would probably be the event class name) and points for
specific event.
activity_user - pivot table between user_activities and users.
and of course users table
It is very simple so I am worrying that there are some conditions I haven't thought of, and it would come and bite me in the future.
I think you'll need a forth table that is simply "activities" that is simply a list of the kinds of activities to track. This will have an ID column, and then in your user_activities table include an 'activity_id' to link to that. You'll no doubt have unique information for each kind, for example an activities table may have columns like
ID : unique ID per laravel
ACTIVITY_CODE : short code to use as part of application/business logic
ACTIVITY_NAME : longer name that is for display name like "answered a question"
EVENT : what does the user have to do to trigger the activity award
POINT_VALUE: how many points for this event
etc
If you think that points may change in the future (eg. to encourage certain user activities) then you'll want to track the actual point awarded at the time in the user activities table, or some way to track what the points were at any one time.
While I'm suggesting fourth table, what you really need is more carefully worded list of features to be implemented before doing any design work. My example of allowing for points awarded to change over time is such a feature that you don't mention but you'll need to design for if this feature is needed.
Well I have found this https://laracasts.com/lessons/build-an-activity-feed-in-laravel as very good solution. Hope it helps someone :)
really could do with your expert advice / knowledge & help...
We have a client who we built a magento site for. He sells parts for motorbikes, jet-skis, motocross etc..
We set up three attributes "Manufacturer" then "Model" then "Year" - and this was the selection process inside each product to drill down a price (as price changes on the models year) to achieve the pricing structure he wanted we used a simpler config products plugin that worked a charm. (which I found searching through these forums)
Problem.. The "Model" attribute is getting way too big (crashing the browser and timing out - and approaching what I have been told is the limit for attributes) so we have to rethink the logic (as last resort is to change the whole site and add them all as simple products and use filters instead - which the client does not want)
After days fo stress and researching we are still none the wiser...
one idea would be to split the model attribute into manufacturer.. so "Hond_Model" .. "Aprilla_Model" and so on.. but then we cant keep the structure of one product with all the options inside, be great of we could have inside the product (front end)
select honda model
select aprilla model
select Can Am Model
Year
but the user can choose one model from any three of the "model" drop downs, then it blanks out the other 2 model attributes and lets the user select the year to get a price.
But in the back end when I try this all three "Model" attributes have a red asterix and require an input in all three..
HELP!
Sorry if some of this is basic I am a designer who is learning magento with the help of my developer for the past 6 months so still new to this but already way out of my depth.
Any help would be so appreciated.
Given the level of complexity, the relative newness of your company with Magento, and particulars of the automotive fitment domain, it might be wise to buy an existing fitment module (e.g. Year Make Model Extension - not an endorsement - i have no firsthand knowledge of this extension) to bootstrap your development or to learn from. You should check with module vendor first to make sure that the code is suitable for this purpose (not obfuscated / encrypted, written using Magento conventions).
There are several approaches which can be taken depending on how frontend presentation and backend reporting should work, but these are too broad to be discussed here.
I'm an old CFML developer, new to CF on Wheels and MVC programming in general. I'm picking it up pretty quickly, but one thing that isn't evident to me is how one can offer a form to optionally update multiple db table records (models). I'd specifically like to set up a tabbed form for User info and User Profile info, where the former is required and the latter is not. This data is stored in two different one-to-one tables. What's the setup I need in order to call two "new" or "edit" views, run 2 "create" or "update" procedures, affecting two different tables. Or am I thinking about this all wrong.
Update: Adding some more info on what I'm trying to do. To keep it simple, I'll stick to 2 tabs and 2 tables, though I'm really looking at at least 3 in this instance.
So I've got a Users table and a UserProfiles table, and I've got models named User.cfc and UserProfile.cfc that are related 1-to-1, with UserProfile dependent on User. Pretty standard stuff. For each I've got controllers: Users.cfc and UserProfiles.cfc, each of those containing actions. add, edit, create, update, doing the obvious stuff (add and edit display forms). I have partials that display the add/edit form fields for each, so that's already prepared. Now, I want to create what is effectively a single add/edit form that can update both tables at the same time. The tabs don't really matter; effectively it could all be on one page.
So conceptually I'm doing something like:
#startFormTag(action=???)#
#includePartial("form_user_add-edit")#
#includePartial("form_userprofile_add-edit")#
<button type="submit" class="btn">#operation#</button>
#endFormTag()#
Do I need to create a separate controller action that basically combines the create and update actions for two different controllers?
Thanks in advance from a pleased and eager CFWheels newbie...
Brian
If all of the data is related through hasMany or hasOne associations, I'd recommend looking at nested properties.
http://cfwheels.org/docs/1-1/chapter/nested-properties
If you're a newbie though, you may want to refrain from this until you've got something simpler worked out.
I guess you are talking about two models representing these two tables, possibly associated using hasOne. Models allow you to validate data, this makes controller much simpler. This way you could create two forms under two tabs, and keep record's primary key as hidden field. Controller could run the validation and re-display the forms (partials may help)... Hold on, I am just going through the reference.
I realize this answer is pretty generic, as well as your question. I suggest you to go ahead and try something, see how it works.
After that update your question with code samples and ask if you have some specific problems. For example, validation and displaying errors in CFWheels may be a bit tricky.
We currently have a Web Forms set up for our website and are looking to slowly convert this to MVC. Currently we store translations in a database. our translation table contains columns for each language and a sort of title. which we can identify the translation with(The primary key)
But it gets more complex when we actually may have different clients wanting different words for the same bit of text.
E.g. one will want it to read - Delivery Costs
And the next may want it as - Delivery Prices
So we then have a second CustomTranslation datatable which will be the same as the translation but also have a client ID number in it. If the user logged in and it looking for the Identify of the translation as "DeliveryCost" it will check to see if there is a record in the CustomTranslation table it will use that OVER the standard Translation table.
After which it will then pick the appropriate language the users wants.
Basically I need to be able to have our website translate depending on the users settings. And as well as the company they work for (our client)
The general method of localization uses resource files but we need to really keep them in the database. This produces a second problem which is when you try to declare Propertry Display Names and Validation Messages these also need to ability to have different text and/or translations but generally it expects a Static field which we would not have.
Whats the best way to go about solving this complex localization issue?
Thanks in advance. Steve
Problem 1 - Having the resources in the database
Use the approach used in this article for extending the standard resources into the database.
Problem 2 - Having custom localization per customer
No problem, the standard .net approach supports localization including a region or customer, just use i.e. en-US, en-US-Customer1, en-US-Customer2, etc.
I have an e-commerce website where it is necessary to make a number of associations e.g. a product needs a category, manufacturer, associated products, etc.
When there is only a fairly small, limited amount of data e.g. Manufacturer I simple use a drop down or option boxes for the user to pick the relevent field / fields.
However for items such as associated products, where I have thousands or products it is not viable to use one of these methods. At the moment I use a searchable / paged table that the user then clicks a button to add the association, this works, but it is pretty time consuming for the user and not what I would consider an ideal solution to the problem.
Has anyone implemented a solution to this problem or could they offer any advice as to how they would come at this from a UI standpoint?
Thanks for any help you can be
The solutions I can think of are:
Auto-complete
Recent associations
Smart associations
There may be more depending on exactly what you're doing, so feel free to add more details or screenshots and I'll think on it more.
Auto-complete
Using an auto-complete field would speed up the process for your users since they wouldn't have to hunt through the table for the association. Rather they could just start typing and have a suggest box appear below the field that allowed them to select what they're looking for.
If you matched your auto-complete on several key fields (i.e. manufacturer and product name), there's a pretty good chance that the user would be able to find the association quickly.
You could also code the suggestion box in such a way that it showed multiple pieces of key data. That way if the user wasn't quite sure what they were looking for, typing a few characters in the field would give them an idea of what they could search with.
Recent Associations
Below your auto-complete field, you could add the 5 to 10 most recent associations that had been made. That would allow your users to quickly add many products to the same association without having to use the auto-complete each time.
Smart Associations
Separate from the above two mechanisms, a smart association is something I first saw when theming a Shopify store. They allow you to automatically create associations based on the products key fields by defining conditions to include or exclude products:
Create Association 'Pants'
Where product title contains string 'pants' or
Where product title contains string 'capri'
The above is controlled by a set of dropdowns and textfields and got around the pain of manually creating associations.