Jump to content

eos

Members
  • Content count

    1,600
  • Joined

  • Last visited

  • Days Won

    75

eos last won the day on April 10

eos had the most liked content!

Community Reputation

226 Excellent

1 Follower

About eos

  • Rank
    Paris 2016 … :-)
  • Birthday 09/08/1964

Profile Information

  • Gender
    Male
  • Location
    Bayern München
  • Interests
    SciFi, Soccer, Crime & Thriller, Coding

Contact Methods

  • Skype
    erolst64

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. If $$subList is your compiled substitution code, then you probably mean Evaluate ( $$subList )
  2. Didn't you say that you created that field in the Invoices table? If it is intended as a note for a given Invoice, then that table is where it belongs, not the InvoiceDate table. That would then depend on into which InvoiceData record you typed it … the upshot is that the note belongs to the Invoice proper, not any single one of its line items. But since InvoiceData is a child table of Invoice, it then of course also “belongs” to all line items.
  3. It shouldn't be; if your InvoicePrint layout is based on InvoiceLines and you place the related field Invoice::invoiceNote there (preferably into the header), you should only see the note from the (single) parent Invoice record.
  4. Did you create the field in the Invoices table? Did you make sure it is not set to global storage?
  5. You could collect the sum of outstanding amounts with the customer: if you have Customer --< Invoice then a field in Customer defined as Sum ( Invoice::total ) sums that total across all related (to that customer) invoices – and this field can be displayed on the next (or any, for that matter) invoice for a customer. Note that in the long run it would be better to not use (par force) unstored calculations, but to use a regular number field and set these values via script whenever a pertinent value changes (new invoice finalized, payments entered etc.) For the start, with a low number of invoices, a calc field should do, though.
  6. Try not IsEmpty ( FilterValues ( Data for Keywords::ID ; global::gCurrent Keyword ) )
  7. With FM13 and newer, you could use a summary field “ListOf: primaryKey”, rather than a CF, to restrict the query to the found set.
  8. Some contortions required, but it seems that this works: . . . WHERE DATEVAL ( LEFT ( STRVAL ( timeStampField ) , 10 ) ) = ? " ; "" ; "" ; aFileMakerDateExpression )
  9. The calculation is correct. You are aware that in Set Field[], this YourTable::YourField is the field to be selected, and that Let ( [ t = YourTable::YourField ; c = ValueCount ( t ) ; v = MiddleValues ( t ; 2 ; c - 1 ) ] ; Left ( v ; Length ( v ) - 1 ) )is the result calculation to be specified? btw, you can also try Let ( t = YourTable::yourField ; Replace ( t ; 1 ; Position ( t ; ¶ ; 1 ; 1 ) ; "" ) )
  10. Well, theoretically after the Commit[], in a sorted relationship/portal the portal rows could be in a different order, due to whatever changes you just saved, so that now the same rowNumber would be a different record …
  11. You've got an answer in that other forum.
  12. … or none at all; if you don't specify the target field, the command acts on the currently active one.
  13. eos

    SQL sum issue

    Try ExecuteSQL ( " SELECT SUM (Subtotal) FROM LineItems WHERE id = ? AND sFlag = 1 " ; "" ; "" ; InvoiceID)
  14. eos

    Problems related variable sum

    No, the question mark is (at least) due to the fact that you're using FileMaker syntax – table::field – rather than SQL syntax – table.field. But (most certainly) also because ç is regarded as a special character, and you must quote such names. But even that won't give you a result, because SQL doesn't use any existing FM relationships; so while a Find in a layout of Lançamentos_Valores for records where a related field has a certain value works fine (because of the correct context), it does not in SQL (which has no context); you need either to create a JOIN (recreate the relationship), or, since that field is related, query the foreign key that relates the tables – e.g. ExecuteSQL ( " SELECT SUM ( Valor_Item_Lancto ) FROM \"Lançamentos_Valores\" WHERE id_despesa = ? "; "" ; "" ; id of the foreign key that relates to a record with Crédito or Débito, respectively ) Note that you don't need fully qualified field names if you're only querying a single table. With a JOIN, it could look like this: ExecuteSQL ( " SELECT SUM ( Valor_Item_Lancto ) FROM \"Lançamentos_Valores\" L JOIN \"Piano_Contas_Lançamento\" P ON P.id = L.id_despesa WHERE P.receita_despesa = ? "; "" ; "" ; "Crédito" ) Note the dot-syntax in the fully qualified names. PS: Please post your code as text, not as screenshots, so it easier for us to present modified examples. PPS: You should really get some reading material on SQL and ExecuteSQL and try some simple example first; there are many things to watch out for, peculiarities and potential pitfalls (special character, reserved words and much more) that we cannot explain all within the scope of a forum post.
  15. eos

    Summary of a sub-summary?

    I don't think you can do that with just a summary field; you need either a recursive field/function, or – the easier variant – a script. Unless you already have it (its pretty useful to have!), create a summary field that counts a guaranteed non-empty field (best choice: the table's primary key). Then use this script: Sort Records [ Specified Sort Order: Violations::addresss; ascending; reorder based on summary field: Violations::sCountAll ] Go to Record/Request/Page [ First ] Loop Set Variable [ $groupSize; Value:GetSummary ( Violations::sCountAll ; Violations::addresss ) ] Set Variable [ $nextStopAt; Value:Get ( RecordNumber ) + $groupSize ] Set Variable [ $newLine; Value:$groupSize ≠ $prevGroupSize ] Set Variable [ $counter; Value:$counter * not $newLine + 1 ] Set Variable [ $resultLine; Value:$groupSize & ": " & $counter ] Set Variable [ $resultList; Value: Case ( $newLine ; List ( $resultList ; $resultLine ) ; LeftValues ( $resultList ; ValueCount ( $resultlist ) - 1 ) & $resultLine ) ] Exit Loop If [ $nextStopAt > Get ( FoundCount ) ] Set Variable [ $prevGroupSize; Value:$groupSize ] Go to Record/Request/Page [ $nextStopAt ] [ No dialog ] End Loop At that point, the figures are in $resultList
×

Important Information

By using this site, you agree to our Terms of Use.