Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

fmdataweb's Achievements


Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. Hi 'comment' - so sorry for getting mixed up here. Thank you very much for your advice - I'll have a crack and see if I can get this working.
  2. Thanks @beverly I think I'm getting close, but my limited understanding of the XSL syntax is probably holding me back. Here's what I've got so far: I've got a style as follows: <Style ss:ID="MyTitleStyle"> <Alignment ss:WrapText="0" /> <Font ss:Bold="1"/> </Style> and here's the bit that exports the records: <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW"> <Row> <xsl:if test="fmp:COL[6]/fmp:DATA = 1"> <xsl:attribute name="ss:StyleID">MyTitleStyle</xsl:attribute> </xsl:if> <xsl:for-each select="fmp:COL"> <xsl:variable name="i" select="position()" /> <xsl:variable name="zFieldName" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@NAME" /> <xsl:variable name="zFieldType" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@TYPE" /> <!-- We are looping through rows and columns, and now we can examine the cell --> <Cell ss:StyleID="MyTextStyle1"> <Data ss:Type="String"> <xsl:value-of select="." /> </Data> </Cell> </xsl:for-each><!-- next column --> </Row> </xsl:for-each><!-- next row --> I'm not getting any bold when there is a 1 in the FlagBold field, and this field is also getting exported. Can you please see if you can spot my syntax error and also how to prevent the FlagBold from appearning the in the final spreadsheet file. Thanks
  3. I could add a field called 'FlagBold' to the table and if this field has a value of 1 it indicates that the record/row should be bold, otherwise if empty it would be left alone, e.g. <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="FlagBold" TYPE="TEXT"/> Is that what you're asking here? (I wouldn't want this FlagBold field to appear in the final XLS spreadsheet file).
  4. Forgot to mention that I can easily flag certain fields/records in the table I'm exporting from if needed to indicate that they should be bolded - just not sure how to incorporate that into this block that processes the rows/fields: <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW"> <Row> <xsl:for-each select="fmp:COL"> <xsl:variable name="i" select="position()" /> <xsl:variable name="zFieldName" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@NAME" /> <xsl:variable name="zFieldType" select="/fmp:FMPXMLRESULT/fmp:METADATA/fmp:FIELD[$i]/@TYPE" /> <Cell ss:StyleID="MyTextStyle1"> <Data ss:Type="String"> <xsl:value-of select="." /> </Data> </Cell> </xsl:for-each><!-- next column --> </Row> </xsl:for-each><!-- next row -->
  5. Hi @beverly I was wondering what the best way to specify which data should be bolded - at the moment I just know which parts of the XML I would like to have bolded. For example here's a particular row I would like to be bolded: <ROW MODID="1" RECORDID="902"> <COL> <DATA>Name</DATA> </COL> <COL> <DATA>ID</DATA> </COL> <COL> <DATA>Category</DATA> </COL> <COL> <DATA>Number</DATA> </COL> <COL> <DATA>Amount</DATA> </COL> </ROW> I'm open to ideas if there's an easier way to dynamically specify which row/col/data elements should be bold however as I have no real experience with XSLT and XML exports.
  6. I'm doing an export of a table with 5 fields to an Excel file with an XSL stylesheet to control the formatting of the Excel data. So far it's working well - I just need to add some additional formatting for a few of the cells. I'm looking for help with examples/syntax for setting the following attributes: - making a cell bold - changing the font size of a cell - making all columns set to auto resize so they fit the contents of each column (same as double clicking the divider between 2 columns) All fields I'm exporting are text fields. Thanks, Steve
  7. Thanks for your reply - I'm a bit lost at this point as to how I might go about fixing this? Do you have any suggestions/examples here?
  8. Line 53 is: $V8fa14cdd->_impl->_styleType = $V77be71a4['styleType']; From memory the PHP API files are obfuscated so can't read too much into this particular line.
  9. Just checking the Event Viewer for a PHP error and noticed many of the following entries: PHP Warning: Creating default object from empty value in C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\php\FileMaker\Implementation\Parser\FMPXMLLAYOUT.php on line 53 I know these are only warnings but would like to eliminate them if possible - I'm running FileMaker Server v16.0.1 using FileMaker's version of PHP. Haven't been able to find anything so far - anyonke know how I can prevent these warnings from being logged in the first place? Looking to eliminate them not suppress them if possible. thanks
  10. I'm trying to understand what could generate an error when performing a FileMaker script from via the PHP API using the newPerformScriptCommand command, e.g. $scriptObject = $fm->newPerformScriptCommand($layoutName, $scriptName, $scriptParams); // Execute the script $scriptResult = $scriptObject->execute(); if(FileMaker::isError($scriptResult)) { // FileMaker PHP API Error -- Alert User. $scriptError = 'Perform Script Error: '. $scriptResult->getMessage() . ' (' . $scriptResult->code . ')'; } else { // no error - continue on } I realise that if any of the newPerformScriptCommand parameters have errors like an invalid layout name or script name it will return an error, but I'm more interested in when the actual FileMaker script encounters an error when will it cause $scriptResult to return an error? For example I was just using this to call a FileMaker script - there was an issue with the FileMaker privileges for a table I was trying to create records in, but the script executed correctly as far as the PHP API was concerned. I only found out about the issues by looking at the Log Viewer in the FileMaker Server Admin Console after noticing the records were not being created. Is there a way to exit the FileMaker Script with a script result that will generate an error with the $scriptResult? Do any FileMaker Script steps cause errors that will lead to an error result when executing the newPerformScriptCommand command?
  11. I have a php page using the FileMaker PHP API that performs a FileMaker script using the newPerformScriptCommand method - this all works well so far. The script performs a bulk email to a selected group of records and can include an attachment. We've found an issue where if someone selects a reasonably large attachment (e.g. a 2mb PDF) the FileMaker script will still send the messages successfully, however the php script encounters an issue and i get "The page cannot be displayed because an internal server error has occurred." in the browser and there's a 500 error in the IIS log file for the script. Does the php script have to wait for the FileMaker script called by the newPerformScriptCommand to finish running before it can continue? We don't need to wait in this instance for the FileMaker script to finish as we would like to continue and let them be sent on the server. Has anyone else encountered this issue with a long running FileMaker script? thanks, Steve
  12. It's returning thousands of records potentially - it was working fine with just hundreds. I've changed the max to 1 and created special layouts for these finds and that has fixed the problem for now. I wish the API didn't return the meta data/data for all the found records until you requested them - just the number of records found and any errors etc.
  13. Hi webko, Thanks for your reply. My issue is that if I set $max to 0 then it returns all matching records in the result, which at a certain point will return a 500 server error as it's run out of memory.
  14. I'm performing some find operations that I only want to get the total number of records returned for display purposes, and don't need to return any records. I've tried using the following: $max = 0; $skip = 0; $request->setRange($skip, $max) $result = $request->execute(); but this looks like it's returning all the found records, not zero records. I had assumed 0 was a valid value for $max but it appears this isn't so. Anyone have any experience with this or know a way to return zero records but still be able to call getFoundSetCount() to get the total number of found records?
  15. Hi webko, Just wondering if you had a change to play with searching and using setResultLayout?
  • Create New...

Important Information

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