I have a main form which contain an embedded view. This embedded view is displaying field values that exist in another form. How can i display fields that are in the main form and fields that are in the other form on the same ordinary view?
Firstly, your View Selection formula needs to select documents created with both forms
SELECT Form = "Main" | Form = "Other"
or you can use a short-hand version
SELECT Form = "Main":"Other"
Then you need to enter a conditional formula in the column where you want to display values from documents created with both forms
#IF(Form = "Main" ; FieldName1 ; Form = "Other" ; FieldName2 ; "")
although, as only those two forms are permitted, you can shorten that too
#If(Form = "Main"; FieldName1 ; FieldName2)
Hope this helps,
Phil
You could emulate the view in a rich text field, using the technique I describe here:
http://www.bleedyellow.com/blogs/texasswede/entry/dynamictables
You need to modify the code to get both your "main" document and your "other" document, and combine them together into one row. This way you can display values from different documents (even one "main" and multiple "other" documents).
It would work something like this:
Create temp document with rich text field.
Get the first "main" document and "other" document(s) associated with it (doc.Responses if they are child documents).
Create a new document using the row template form, and put values into the different fields.
Render the new row document into the rich text field on the temp document.
Repeate above steps for each main document.
If you only have values from one other document displayed on the main form, there's no need to use an embedded view to display the values. You could use computed text to display the values from the second document along with values from the main document.
If you need to view multiple documents and want to include values from the main document in the embedded view on the same lines as the other documents, I would recommend having the values from the main document be stored on those other documents, rather than trying to put the other document data on the main form (since there would be multiple other documents, requiring multiple field values on the main).
That said, if the field values are already on the main form, why do you need to display them a second time on those lines in the embedded view? After all, it would repeat the same value on every line in that column.
Visualize it in sql format:
Form A:
EmpNum | Name
Form B:
Name | Project
Can I have something like this in Lotus Notes:
SELECT *
FROM Form A, Form B
WHERE Form A.Name = Form B.Name
Related
I want to Copy the Field value from one Form to other Form by #formula, How can it do it.
Main Form name is "A", second Form name is "B",
Form "A" Field include[ID/Name/AEmail],Form "B"Field include[ID/DateTime/Record/BEamil]
When create a new record on Form B, then the Bemail Field value=AEmail when A.ID=B.ID.
First of all: You don't want to copy field values from one FORM to another, but from one DOCUMENT to another. It is important to understand the difference... A form defines, how to display Data, a document CONTAINS the data (and is displayed with the form that is named in the "Form"- item of the document.
But now to your question: If document A is selected, when you create document B, then you simply enable the FORM- Property "Formulas Inherit Values from selected document" on the second tab of the properties.
In the field- formulas of form B just enter the name of the Field in Form A as Formula.
e.G.: If the field in Form A is named "AEmail" then enter AEmail in the Value of field "BEmail" of Form B.
Beware: this "inheritance" is only done ONCE when the document is created, there will be no relation between the two documents to update BEmail, if AEmail changes. To update the values dependantly you would need to construct something like #GetDocField( unidOfDocA; "AEmail" ) but that would need some more knowledge of the formula language.
I have a form and it's record source is a table. I created the form separately and added the control sources to the different fields in the form and also changed it's record source. I imported values from an excel sheet into the table and when I open the form, I do not see the tabe values being displayed in the form. Any idea what I should do to see the table records in the form?
In form design mode, check the form's DataEntry property. It sounds like yours is set to Yes, which hides existing records and only allows new entries. Change it to No and you will see the existing records.
Another possibility is that a filter is active and no records match that filter.
Use a form wizard to generate a working form based on your table. Then once you can see the data being displayed in the form, customise as needed.
I need to build the following form field. Let's take the case where in a form I have multiple fields. Two of them are "last name" and "first name". Instead of the classic way when these field will show seperatley I want a single fields thatt shows when completed like a text field with value a concatenqtion of e two values ( ie "michael jackson"). When I click on the field an window (like a picker date) will popup haing a form with the two fields.
Unfortunately i do not know where to start from:
what class should I derive
how should I store the value in the form ( two hidden values or just a serialized value of the fields).
I might have complex structure with 5-6 fields in this picker popup.
I would extend Ext.form.field.Picker. In the createPicker() method you can crate whatever combination of fields an components that you want.
Re: storage of data, I'd serialze the values in the one field. Then you can treat reads and commits in the same way (and you can always manipulate the data later.
Here's an example that I did a while back: jsfiddle.net/existdissolve/wMcQk/
I have a main form called fm_Main. This fm_Main contains an embedded view which has 2 actions: Add & Delete. When I click Add is opening another form called fm_Second and here I can add some fields which will be displayed on the embedded_view on fm_Main.
The problem is: Let say I have 3 documents. All of them contains an empty embedded view. If I add some value fields in one document into the embedded view and then I save that document, all the 3 documents contains that values into the embedded. It should be: just one of them should cotain because I modified only one, the 2 of them shoudn't have that values displayed in the embedded view. Thank you!
PS: Also if I saved one document with an entry into the embedded view. When I want to create another new document, in the embedded view there exists the last entry from the last document. I want to be empty!
You must filter the embedded view to only show the entries related to the currently open main document.
Most programmers would use the UniversalID of the main document, it can be automatically populated into the entries you create.
One thing to think about is that you may want to store the Universal ID in a computed when composed field on teh main document. If you get a replication error in the future, the Universal ID may change, and you will not be able to get to the entries in the embedded view.
I been doing exactly this in several large Notes databases, works perfectly fine.
Expanding on Karl-Henry's suggestion, you should make into a categorized view and use the Show Single Category feature of the embedded view. I might suggest using the #Unique function instead of the UNID to relate the Main and Second documents, but that's a matter of preference. In either case, you have to make sure that the value inherits down into a field in the Second docs, and you can use that field as the category for the view.
I need some help with Access 2010 forms. My form has a number of fields (from one table). One of the field is a logical field. If the user selects true, then the next field (text field) should be enabled. This is working fine - I created an after update event procedure. The problem I have is if the user accidentally selects true, and then selects a value/s for the text field (the text field looks up a query - it is a look up field and it can have more than one value - the user can select/check as many from the list and they will be stored to the text field, separated by coma).
How will I set the text field (look up field) value to blank, if the user goes back and set the logical field to false? me.textfield.value = null gives an error.
Can anyone please help me? Thank you!
Just keep in mind that in fact a multi-value column is in fact a normalized data table.
So the display looks like this:
To clear the records selected in this child table, which is your mult-value selection, you can use this code behind the above button:
Dim rstChild As DAO.Recordset
Set rstChild = Me.Recordset.Color.value
Do While rstChild.EOF = False
rstChild.Delete
rstChild.MoveNext
Loop
Me.Color.Requery
An easy way to insert a blank lookup field is to select the field in design view and click on the lookup tab in the field properties. Before the first entry in Row Source insert the following " ";