Microsoft Access 2013 Record Source Columns - ms-office

I recently got tasked with customizing a report in an access database, I havent touched access in years so its a little rusty for me. I have successfully added the Fields to the table, added them to the form and added them to the report. If i run the report they query correctly. But all the other fields on the report are setup with an expression such as:
=IIF([Mold Temp High]=0,"----",[Mold Temp High])
Now the expression makes 100% to me but when it auto populates the field, such as Mold Temp High, for all the previous fields i can see they show up as Record Source Column fields, but for any new field i have added shows up as a Text Box.
If i create an expression with the new fields i get a Circular Reference and it shows #type on the report instead of the value.
Just curious to why the new fields show up as TextBoxs and not Record Sources.

I'm guessing that you are dragging the new fields from the field list. When you do this, it creates the text box with the exact same name as the data field. So when you use this name in an expression, it thinks you are referencing the text box object. To prevent this problem, make sure that every time you create a new textbox (or any control) from a data field that you name it something different by setting the Name property of the text box. Generally I just add "txt" to the front of the field name. This will ensure that you are always explicitly referring to either the textbox name or the data field name.

What if you change your logic around a bit..
We remember, IIF is constructed as:
=IIF((Some_Table_Field or value),True-condition,False-condtion)
You maybe looking at:
=IIF([Mold Temp High]=NULL,"----",[Mold Temp High])
Or, maybe (use ISNULL or ISBLANK it has been a while for Access with me as well):
=IIF(isnull([Mold Temp High]),"----",[Mold Temp High])
Or, rather:
=IIF([Mold Temp High]<1,"----",[Mold Temp High])
Hope this makes sense.

Related

How do I take the input values from one screen to a gallery in another screen PowerApps?

I am using PowerApps Canvas for the first time. I have created two screens. One has a gallery connected to an excel sheet. It displays the table contents from the excel file. And the second screen has some input text fields. I want to enter values in these fields and click on submit, so that when I go to the other screen I can see this new record in the gallery. I want to use the collect function for the submit button but it is showing problem with using Record1 (name of the global variable in which I am storing the excel table). It says the specified data source cannot be used.
Collect(Record1,
{
AgentName:TextInput1.Text,
ID:TextInput4.Text,
Shift:TextInput2.Text,
Weekoff:TextInput3.Text
}
)
I am setting Record1 as a global variable in the onStart property.
Set(Record1,Table1);
Edit: I ran onStart and the error is not there but new record isn't being displayed on the gallery. There is an error with setting the global variable Unexpected Characters. The formula contains 'Ident' where 'Data' is expected.
Making a global variable wasn't required. I just used the excel table directly in the other screen and the collect function works now.
You want to store your input into your excel right? You need patch instead of collect. Collect is for local storage, patch creates an item in the datasource.

Kentico - Change Pagetype Field Name without blanking out current values

I have a custom page type for Staff and there's a field called Function. I have a WHERE condition in a repeater like this: Function LIKE '%insurance%' and got an error Incorrect syntax near the keyword 'Function'
From the error I guess Function is a reserved keyword, so I changed the field name to BusinessFunction. However right after changing the field name, I noticed all the values for that field become blank. If I changed it back, the values are back to normal. The question: is there a way to change the field name while keeping the values that are already there -- without access to the backend database?
Wrap the word Function in brackets like so should resolve the problem: [Function]
When you say the values of the field are blank do you mean on the display side in the repeater? Have you changed the transformation to use the new field name? Have you updated the Columns property of the repeater to use the new field name vs. the old one? It will not lose all the data, you just need to ensure all the values of the property/field name are updated everywhere including any custom code you might be using for this page type.

Copy fields from FormA to a new form FormB

I am trying to simplify an existing Notes Form in an application that I am converting to XPages. The Notes Form has over 240 fields on it and a bunch of logic that I want to clean up. Plus the form has all kinds of display formatting that makes viewing it complex. So what I have been trying to write an agent that will get FormA and cycle through all the fields and copy them to FormB. I will then use FormB to bind my XPage to and trying to track down data issues will be much simpler. If the FormA didn't have so many fields I would just recreate it manually, but I'm sure with over 240 fields I would introduce some new typo errors.
You don't need to do anything with your form in order to create a XPage layout for it.
XPAges don't need a form at all, although it makes development easier, as after creating the data binding all fields from the form are available and can be dragged and dropped to the Xpage. Fields that are not on the form have to be created manually in the source code of the xpage (e.g. copy and paste an existing one and change the binding/name)
If you want to clean up your documents, an agent can do this without even touching the form.
For this task please consider the difference between a "Form" and a "Document".
A form is a design element that defines the look and feel of a document.
Forms contain fields that define what type of data you can put in your documents.
A document is a stupid "container" for items (not fields). It contains items for any field on the form that existed in the form when the document was created / last saved. PLUS items that are created any other way (e.g. Using formula or lotusscript agents) or that have been on the form in an earlier stage of development.
If you remove a field from a form, it will NOT be removed from the corresponding documents, not even by saving them. But If you add a field to a form, the document will have an item for that field after saving (forever, if you don't remove it manually using an agent).
With this knowledge you can simply create a new, "cleaner" form with the same name as the old one and rename the old one. From this time on, document will be displayed with the new Form and you can develop your XPage using it as your data source.
If you need to accumulate the data in the documents, this can be done with an agent without using a form: just manipulate the document DIRECTLY.
Here is an example in formula to put two fields together:
FIELD NewFieldName := OldField_1 : OldField_2;
FIELD OldField_1 := #DeleteField;
FIELD OldField_2 := #DeleteField;
I think, in most cases it's not a good idea to have a form with 240 fields. It looks for me like a form from old Notes 3 or 4 times when no embedded views were available and one to many relations were put into fields with index e.g. 1 to 20.
Maybe, a redesign is a better way to go.
Also, you don't need to create and maintain a form with all 240 fields for developing your XPage. Actually, you don't need the form at all. With a data source definition based on "Domino Document" you define a form name and which way you want to create a new document or find an existing document. That's it. Then you can create your fields in your XPage. Give them a name and a type. You can do this in Designer UI. Just write the new fieldname into "Bind to" for selected "Data source". Select in "Display type" a field type (String, Number, Date/Time). That is not only valid for display but will save the field as selected type to document too. In this example it will create a new field "YourNewField" and will save it as a integer number.
When you submit the page all fields will be created or set in document. You can check the fields and their types in Notes client using the document property box.
A good way though is to create the form with the most important fields. Then you can open the document in Notes client and check the fields set by XPage.

Filtering a repeating table linked to a secondary datasource

I have an infopath form based on a sharepoint list (worktracker).
In that form there is a repeating section which holds data from a secondary source which is the worktracker list again.
I would like to filter that table using the value in a field on the form - this enables me to run a check on duplicate items on the list by using a calculated checking reference.
I have done this by using conditional formatting to hide the non-matching items but that this killing my form as IE throws tantrum as it takes too long.
Does anyone know another way to do this? I am stuck using IE8 - not my choice!
UPDATE:
So since posting the above, I had since tried using a REST connection which doesn't work as my list is too big. I have also tried using an XML connection to a filtered view and that didn't work either!
Cheers,
In the form, select the value field. Create a rule that sets the secondary data source's query field of the same name to that value. Then query the secondary data source. It will only return the items where the value matches.

MOSS 2007 Document Library - choice column not displaying selected value

I have something funky going on with MOSS & was wondering if anyone out there has seen anything like it:
I have a document library in MOSS that has several custom columns added to it. I have a column of type choice. For one document in the library (a word document), the selected value does not get displayed for the one column - all of the other columns are fine & the other 60 documents in the folder display the selected values correctly. When I edit the properties of the document, the value of the column is defaulted to blank, I can change it to another value & save it. However the new value doesn't get displayed in the list view, nor does it show up if I edit the properties again.
If, I open the document in word & view the Document Information Panel it displayes the value that I had selected & saved for the column. However, the column is being displayed as a text box & not a drop down. The value still does not get displayed in the list view or properties view after a save.
Has anyone seen behaviour like this before?
My first guess is a name collision between your custom column and the columns that ship with SharePoint out of the box. What is the column name that is causing the problem?
I have seen situations like this when there are documents in a library, and then columns are added. The existing information does not get updated properly.
If you reupload the document as a second content, does this happends again ?
If yes, you may check advanced properties of the document before uploadind it. There may be some data in it that SharePoint try to use when importing the file. It may explain that you don't have the issue when you copy/paste only the content.
Along a similar line, it could be that the problem doc has a Word metadata field named subject, and MOSS is doing its property promotion thing to mess up your field. If so, clearing the Word metadata might fix it.

Resources