I want to trigger some validation on select of an item in drop down field in SM30, based on that I want to disable and enable some field.
You have to create modification event for validation on Table Maintenance. You can use Maintenance event 01 Before saving the data in the database for validation, But validation on select item of dropdown is not possible in table maintenance. If you want validation on select of an item from dropdown list then i would recommend for creation of custom report program or module pool program.
You should maintain the generated program.
SE80 --> Function Group --> screens --> {generated_screen_num}.
Treat it like any other program.
Related
I created a database in Access and there are some type of records in some tables that requires a particular inserting, so I decided to use VBA to handle this.
The problem is that if i create a form with some controls which i want to refer and use their values as criteria for queries, the form is still a way to insert data. So the query works but the data i inserted are added directly from the form too, creating duplicates.
The question is, is there a way to create a form that has controls only for text input but does nothing to record , leaving inserting, deleting , updating all to queries in VBA?
I tried to put "no" on propriety "add records" in the form but it gets totally blank with no controls.
Your form must be unbound, i.e. its RecordSource must be empty.
Your form can be bound or not bound to a table / query.
This means that the controls on your form may be bound to a field of that table / query.
But you can also have controls in the same form which are not bound.
Example:
You can make a form in which the body has a list view of the records of the table. In this section the controls would be bound to a field.
In the header of the table instead you may have controls that are not bound and that could be used either to filter the records shown or to add new records. You may want to add records this way rather than let users insert data directly in order to add checks or do any other kind of processing before actually adding the data in a new record.
I'm new to lightswitch and i searched lot, but couldn't find proper solution for this simple question. I need to add items to combo box, based on user selection. ( not from existing table)
For example if user select country ,following towns must add to combo box.
USA - Texas, New York etc
UK - London , Surrey
How can i do this? i'm using vb.net as my back end. i found this article How to create an unbound combobox as useful one. but couldn't able work according to my scenario.
what is the way to add items to combo box?
In Lightswitch, if you want to have a dynamic set of data bound to a control, that data must be in a table. You then need to create a query that filters the data in that table based on the user's selection and bind your control to that query.
Here is a pair of articles that describes implementing a situation that is similar to yours:
Nested AutoCompleteBox for data entry
Nested AutoCompleteBox for data entry Part 2
We can't directly assign our own values to combo box. we have to use either data table ( as mentioned by embedded.kyle ) or we have to create custom control to assign values.
i have used custom User Control for above scenario. detail step that i followed can be found in following Link
Adding a record that doesn't already exist in a bound table is a very common scenario. Unfortunately, there's no out-of-the-box way to do this in LightSwitch, you simply have to write code to achieve it, like in this blog post.
Add non existent records using AutoCompleteBox
Or, of course as was also suggested, you could create a custom control to do the job.
May I know if it's possible to have a drop down box in every row in the Rally Table?
It is. Check out this example here (scroll down to Displaying Components in Cells):
http://developer.rallydev.com/help/tables
If you'd like to also make an update to the data when the value of the dropdown changes you'll want to wire up a listener to the onChange event and then use RallyDataSource's update method to change the data in Rally.
Hello
I have repeating table on my infopath form. It is bound with xml file through web service. my form have submit button. I am able to submit data from infopath for to xml document via web service. I want to validate my repeating table to avoid duplicate records. how to do this validation. ? please guide me I am new for this.
You must use validation rule.
You must select specific field of repeating table.
Add validation rule to it.
Select the expression and add rule:
../my:fzScopeName = ../preceding-sibling::my:fzItem/my:fzScopeName
or
../my:fzScopeName = ../following-sibling::my:fzItem/my:fzScopeName
Note that: My field name is fzScopeName and fzItem is parent it, as same repeating table structure. see this image
Well basically I am working on an MSAccess application and on the form where administrators will view and edit user data I want to be able to call an event with the old and new values of a field whenever it is changed. This function will add a record into the audit table to track changes.
I have no problem creating the query to add the entry to the audit table but I don't know where to place the function call. I've tried a few form level events so I don't have to go into each of the fifty fields and edit their onBlur events to check for a new value but have had no luck.
Any tips would be welcomed.
Microsoft has an article on this: How to create an audit trail of record changes in a form in Access 2000.
You can call your function in the After Insert,After Update and After Del Confirm events. These are kind of like triggers that fire after a record's been inserted, updated or deleted.
solution (1) would be to add an event handler in the "beforeUpdate" event. Remou's proposal is very interesting for that.
solution (2) would be to compare data in the recordset to data in the control in the afterUpdate event: for controls bound to fields in recordsets, there is allways a step where the value in the control differs from the one in the recordset. This is very easy when control sources are straight field names.
But I did not like the concept of auditing changes at the Form level: its results can be ambiguous as data changed at the form level might not be saved at the table level, either because form can be closed before the underlying recordset is updated, or because the SQL query is not sent to the server.
If your data update is made through SQL synatx, solution (3) would be then to store the "INSERT" or "UPDATE" strings sent from your Access app to your database server in a "transaction log".