FileMaker 17 Sub-summary value - sql

Edited:
Let me try to explain more clearly. I wrote the earlier message in haste:
I have a sub-summary part which is sorted by the parent table's ID field. In this part, i have placed a summary field from the child table ( on which the layout is based ). This summary field is a running total of a number field in the child table , with restart checked. When this field is placed in the sub-summary part, it summarizes the values of all the records below it. Which is fine. What i want is to show that summarized value in each of the records just below the sub-summary. So for instance if the summary field shows a total of 1,000, then i want to show that 1,000 in each child record below in the layout. Then when the next break occurs and the field summarizes the next set of child records in the sub-summary I also want it to show the same value in the next set of records below it. I hope it's a little more clear.

It's difficult to understand what your question is. Some statements do not make sense at all. A sub-summary part is based on a field, not on a table. And a summary field is not "sorted".
If you want to show a running total in the body, without restarting at each break, you must define your summary field so. A summary field does not have to restart in order to show sub-summary values when placed in a sub-summary part.
Added:
A summary field displays the sub-summary value only when it's placed in a sub-summary part. If you want to show the same value elsewhere - or use it in a calculation, you must use the GetSummary() function.
Note that the GetSummary() function will only work if the break field is a local field. If you're grouping by parent, make sure you're using the foreign key field in the child table - not the primary key field in the parent table.

Related

SAP - See all table entries in SE16 for table with numeric key

I'm trying to inspect the data of a table via transaction code SE16(n) on a development system. I'd like to see all of the table's records. In other words, I don't want there to be any selection criteria. But the table has a numeric key that I have to specify. Is there a wildcard-like value that I can enter so any record matches the key?
Thanks in advance,
Joshua
In transaction codes SE16 and SE16N, by default all the lines of the selected table should be displayed up to the maximum defined in the selection screen (leave the field blank to display all).
If you click the button "Number of entries", you can see how many lines there are in the table (NB: it counts only the lines in the current client if the table is client-dependent).
Sometimes the selection may not work well if the selected table field has a "kind of defective" Conversion Exit (at Domain level in the ABAP Dictionary), but that happens rarely.

columns dereferencing in SharePoint's calculated column

I want to use the simple formula:
="FIX_" & [ID]
The issue with this formula occurs when I confirm the calculated function, the formula appears to revert back to:
="FIX_" & ID
The problem is now that these are no longer referencing the [ID] column so the result returns
"FIX_"
for all records. This does work for the first record entered but any other subsequent entries display this error.
Is this a known issue?
The [ ] notation has got nothing to do with it.. [ ] are only required if fieldnames contain spaces.. As you experienced SharePoint will strip those [ ] on save.
why ID is not listed as a usable Field for Formulas
You can not use the ID in a calculated column because on first Item creation the Calculated Column Formula is processed before the item is written to the database and gets its ID.
Thus ID is 0 for newly created items
When an Item is changed/updated the ID is correctly populated and used with the correct value in Formulas.
Work-around is to create a Workflow (which runs after Item creation) that gets the ID and writes it to another field, and use that in your Formula
or have the workflow changes something else in any field so an item update is forced; reading the Title and write it back in the same field will do.
So you only want to display the link in a VIEW.
You can then use HTML/JavaScvript in a Calculated Column to extract the correct ID from the HTML TR table row
and create the href attribute.
Create a Calculated Columns, and set the datatype to Number!
Paste the Formula (as is, including & characters, line breaks will be ignored):
="<div ""style=text-align:left""><a><img src=""/_layouts/images/blank.gif"" onload=""{"
&"var row=this;while(row.tagName!='TR'){row=row.parentNode;}"
&"var ID=row.id.split(',')[1];"
&"this.parentNode.href='v://database//FIX_'+ID;"
&"}"">database folder</a></div>"
Note: the outer div is added because a Number column is aligned to the Right.
This only works in VIEWS! Not on FORMS!

MS Access Delete query based on combobox

I have a table with a bunch of different fields. One is named period.
The period is not part of the raw data but I run a query when I import new data to the database that gives each record a period.
Now I need a delete query that will delete all the records that have the same period as what is selected in a combobox.
The values in the combobox come from a calendar table that contain all the possible values that could be in that period column at any time.
This is the basic query i thought would solve this issue but it tells me it is going to delete 0 rows every time I run it:
DELETE *
FROM PlanTemp
WHERE PlanTemp.period = Forms![Plan Form]!Combo163;
If you don't need the key field, just remove it.
Look at the "PROPERTIES" section and look at the column names.
Ether remove it there, or from your QUERY source.
You can also look at the Data section of the properties, and change your BOUND column, to Column 2... or whatever holds the data you want to use.

Sorting Fields In access by the time they were entered

What I have here is a table with some text fields. I basically put in the name of some students into a table. I got their info from forms that teachers had sent me. When I put their names into the database, I just put the names in based on which form was at the top. Does access track the actual time that a field was put in in such a way that I could sort my text fields by that so that when I give a list of what I just did to someone else, they won't have to sort through the stack of papers to make sure all of the papers are there?
I should add that I need to track this for an individual field, not just for the record. For instance, let me take this one piece of paper I have. When I get it from an outside agency, I then put it into the database with the student's name and some info. I then need to send it to the teachers for them to sign and send back to me. I am on the second part so the record had already been created, but I want to find the date that I entered the Date_signed field basically.
In this example, you set the default value of the dtmEntered field to Now()
p.s. Same answer as HugoLemos but with a pic :)
You can use a Date/Time field with its default value = Now() to store the time each record is created, as already suggested. That approach works fine when only one user can be adding new records, which sounds like your situation.
If you wish to also store the time an existing record is changed, you can do that from a form's before update event.
This example assumes a text box named txtLast_change which is bound to a Date/Time field in the form's record source. The text box does not have to be visible to the user for this to work.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.txtLast_change = Now()
End Sub
Create a field with a date type and set default value to Now()
As you have discovered, there isn't any way after-the-fact to know when data was entered in to your table, as it's not something that you captured in the first place. As you mentioned in one of your comments, you can determine the order in which you entered new records based on the Id, but knowing when additional data was entered would require more tracking fields.
In the future, you may want to think about a table design along these lines:
Column Name Column Description
ID Record Id
STUDENT_ID Student Id Number
STUDENT_FIRST_NAME Student First Name
STUDENT_LAST_NAME Student Last Name
... Other student info ...
DATE_ENTERED Date/Time entered
DATE_SENT Date/Time sent to teacher
DATE_SIGNED Date/Time signed by teacher
UPDATED_DATE Date/Time record last updated
UPDATED_BY User that made the last update
If it's possible, you could always edit your table and add these datestamp columns. You'd have to allow for null values, as the previous entries wouldn't have a date/time value for some of them, but it would let you track future entries.

How to get min/max values on form that returns multiple records

I've got a form that returns multiple records from a table. Each of these records has a field indicating what the measurement was and the measurement's value. My form's record source pulls the appropriate ID's set of measurements and values, and then I want to write each of these measurements to different text boxes on the form.
The problem is that I'm also keeping track of the date this data was updated, and want to include only the data pulled based on the "date updated" selected at the top of the form.
When I go to pull the measurement value into a text box (with something like max(iif(Measurement="Acidity", [Value],[Null])) I get #Error all down my form. This had been working earlier today, and as I've been developing the form something changed and now it no longer works (everything but the date returned is saying #Error). I've set it to Requery when the form loads and whenever the date selected is changed.
EDIT:
This form is actually a subform of another main form. The main form has a control called MemberID which a user can use to select the Member they want information about. This is based on a query that pulls from a table the information related to that MemberID (one row per MemberID). When the form loads, the query behind the main form needs to be requeried to get the data for the selected MemberID.
Then there is this subform causing the problems. On this subform is a "Data Updated" drop down box, which lists the possible dates that the data was updated. When one chooses a particular "Data updated" in the drop down box, this chooses the latest data for all the data measures up to that date selected. This means the form's record source pulls about 10 records in my case.
Then, on this subform I try to layout these 10 records' values in different text boxes. So, in my acidity case above, I would say iif(Measurement="Acidity", [Value], Null). Because there are 10 rows returned, I will end up with 9 Nulls and 1 value, and to get that value I use the max function, so the text box's control source reads: max(iif(Measurement="Acidity",[Value],Null)).
The strange thing is this code was working this morning, until later this afternoon when I was filling in the remaining text boxes with similar code, and then it stopped working. I had also renamed the boxes from Text71 to more relevant names, but none of these are referenced in the code.