Jump to content
Sign in to follow this  
mjrp

fmp17 Help! CreatedBy requires a value error

Recommended Posts

Hello there

I am hoping for some guidance from those far more knowledgable than I. I am new to filemaker, using the Asset template, adding some extra fields and making it work for me, unfortunately, there is an error with "CreatedBy is defined to require a value, but it is not available on this layout" as the pop up.

I have worked out I need to have a box, linked to createdby, I am logged in, when I complete the process of assigning an asset to an individual, the createdby linked box inserts my name automatically, then when I try to click off or to a new asset entry, the warning comes up. 

 

I am on mac, Mojave, if that makes any difference. I have validation on "not empty" which it isn't, as my name is auto populated, so not sure how else to sort this out. Any advice would be appreciated, aware this may be a little vague, I'm new at this so let me know what extra you need to see.

Many thanks

Mat Richardson

 

Screenshot 2018-10-23 at 22.41.44.png

Screenshot 2018-10-23 at 22.42.53.png

Screenshot 2018-10-23 at 22.43.04.png

Share this post


Link to post
Share on other sites

Did you check Manage->Security->Privilege set that you actually have permissions to write to that field? Does it work when you remove the restrictions? Ie, untick 'not empty', 'prohibit modification'?

Share this post


Link to post
Share on other sites

Hi, thanks for answering! I checked both of those options, it didn't change anything when I unticked the "not empty" box within the Assignments table, same error. So I unticked it in all 4 of the tables, Assignments, Vendors, Employees, Assets, still no change, same error. I checked the privilege set, I have full access to everything, so I don't think it's that. 

Strangely, it is auto populating the CreatedBy field I have put on the page, it does this for my name when set to that, I can also log in as Admin, it populates then too with Admin, but still has the same error. I started a new database with the same template, made no changes other than to add a random name, a random asset, assign the asset to that name and the same error comes up, so I don't think it is something I have changed or removed, it's something I'm not doing. Added the relationships as well in case that shows anything, I haven't changed them from the original template though.

Any suggestions? Thanks!

Screenshot 2018-10-24 at 05.51.46.png

Screenshot 2018-10-24 at 05.37.10.png

Share this post


Link to post
Share on other sites

I just made a copy of the database, then tried removing createdby from each of the tables, thinking maybe I could remove the problem by not having a record of who created the entry, just leaving the time and date with the creationtimestamp, now when I click somewhere within the record, it says creationtimestamp is defined to require a value, same issue even though the time and date have been automatically entered, so I think I have bigger issues than just removing the requirement for my name to be assigned to the action of creating the entry.

Share this post


Link to post
Share on other sites

Ok, so I got to the bottom of it, solved for now. In case anyone has this error in the future, I had made the mistake on the asset table, of thinking I had added createdby and creationdate to the layout, but I had only done so within the assignment section of the layout, not in the actual asset section. By creating another createdby box and creationtime box, creating a new asset, these 2 boxes were automatically populated and the error then goes away when I assign this asset to an employee.

I wouldn't say it's intuitive for a beginner but every day is a school day. 

Share this post


Link to post
Share on other sites

I did not understand your original description of the problem - and I don't understand your solution now. A field defined to auto-enter a value (such as Account Name) does not need to be placed on any layout at all.

I am also not sure why such field needs to be validated as 'Not empty', since it will be automatically populated on record creation without the user having to do anything. In any case, because the field will be automatically populated on record creation, it will also pass such validation, if you choose to add it.

Both these actions - auto-enter and field validation - take place at the data level, and placing the field on a layout or removing it from a layout should have no effect at all. If it does, there must be some other factor at play here.

--
As an aside, if you do place such fields on the layout, they should be non-modifiable by the user in Browse mode.

Share this post


Link to post
Share on other sites

Thanks for the comment, I guess that's the nature of problems, I don't understand it either! I am not an expert by any stretch of the imagination. 

All I know is, that if I didn't have a physical entry on my asset sheet, showing who created the entry and when, then when I tried to assign that asset to an employee, the warning box would indicate that the createdby field required data and didn't have any. Soon as I put 2 fields in the layout, assigned to creator and time, the error went away because the fields now had data in them. That may not make sense but it's the only thing I did differently and it worked. 

I have another issue concerning this now, it's fine if I manually add a new asset, the 2 fields are automatically populated and I can assign it no problem, but I have all my assets on a spreadsheet, when I import the assets, then the created by and date are not automatically filled in, the error returns and as they are autofill boxes, I can't edit them. 

Any idea how to force the createdby and date to populate on the import of data from a spreadsheet?

Sorry if my simplistic way of explaining things makes little sense, I'm not coming from a position of knowledge on how filemaker works.

Share this post


Link to post
Share on other sites

Well, as I said, I did not understand neither the problem nor the solution. As a rule, in order to understand a problem you must be able to reproduce it - and I can't think of a way to reproduce the behavior you describe. If you can create a simple file - say just two fields, one for a user-entered value and one auto-entered - that exhibits the same behavior, please post it here. Or use a copy of your existing file and remove everything except what's necessary to show the problem (usually, when people do that, they find the problem themselves).

Until then, I would urge others reading this not to draw the wrong conclusion. And in your place I would be prepared for other issues to follow.

 

46 minutes ago, mjrp said:

how to force the createdby and date to populate on the import of data

When you import, you should see the option to "Perform auto-enter options while importing" in the Import Options dialog. If you don't, then the target table does not have any fields that auto-enter values (and that could be a hint as to what the real problem here is).

 

46 minutes ago, mjrp said:

as they are autofill boxes, I can't edit them

It's not because they are auto-entered fields per se - it's because you have also checked the "Prohibit modification of value during data entry" option. And you still can modify them using a script.

 

Edited by comment

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By flutegirl
      To try to explain the setup as succinctly as possible:
      Database is running on a FM17 Server (on a Windows virtual(?) machine... Our IT department handles that part).
      The FM database does a number of imports every morning from our primary (4D) database, using an ODBC driver, but I have not found a way to have those imports run successfully from the server, so I have them running on an instance on a secondary user account on my desktop computer.
      The scripts are triggered by adding a record to a table, which is checked every five minutes using an OnTimer script.  I run a separate instance of FM17 on my user account so that I can use the database even if there is an import running.
      This solution has been working (fairly) well for a number of years, but last week, my desktop computer was updated to Mojave (10.14.6), and since that upgrade, it seems that the imports on the secondary account will only run while that user account is active.
      1) Is anyone else doing anything similar, where they have an instance of FM running on a separate user account?
      2) If so, have you had any trouble with Mojave, or have suggestions on what may be going on?
      3) Any suggestions on how to fix this?  My initial thought is to just open the database using FMP on the Server system and try having the imports run from there, but am concerned that might also have problems.
      Any suggestions would be greatly appreciated.
       
    • By OneStop
      I have a field called Price. I need to create another field called calculated price that will add a percentage depending on the value of the original Price field.
       
      Example:
      If the Price is $100.00 or more Subtract 10% from the price
      If the price is $10.00 or less Subtract .25%
      If the Price is between $10 and $50.00 Subtract .5%
      If the Price is between $50 and %100.00 Subtract .75%
       
      and so on and so on...
      So if I have a record with a Price of $1.00 the calculation will fill in the Calculated Price field with $.75
    • By BAleiHi
      I have a layout calculation that looks like:
      Round(If($$NoGPABump = 1;Classes::GPANoBump; Classes::GPABumped);2)
      In most instances, this rounds the appropriate value to 2 decimals  and displays those two digits.  But on occasion, it displays only one decimal as in this one:
      .  Instead I want to see 4.20.  If I round to, say, 4 decimals, it works properly: .  Rounding to 3 digits gives 4.199.  How do I get the trailing zero to show up?  This seems to be consistent for all data that rounds to a last digit of zero.  Is this a bug?  Is there a workaround?  Thanks,
       
    • By vinnygi
      I have a layout with a number of button bars, all with the same style. Each button is set to have an inner shadow and a white fill on Hover. For any of the buttons that call a popover, after the popover is closed, the hover shadow no longer works, but the fill still changes to white.  I've tried adding a refresh object script trigger when closing the popover, but that doesn't work.
      Some of the buttons are currently placeholders, which just call a script that exits itself so I can test the hover state.  Those work fine.
    • By Will_Logic
      Hi, I am using the Base Elements plugin Execute SQL command to select SQL on a table in another FileMaker file. For a file with many fields and quite a lot data in some fields, this times as about 1 minute just for SQL SELECT command for 1,000 rows. I haven't used MBS (monkeybread software) plugin yet, but I wonder if anyone knows if it is significantly faster?
      I.e. BE_FileMakerSQL vs. MBS(FM.SQL.Execute..) - is one significantly faster?
      Here's the code to select 1,000 rows for reference, $timer_seconds comes as about 60 seconds here. If I export same table internally in FileMaker using the menu export to Excel, it takes 29 minutes for all 41,000 rows, so timing seems similar for the Base Elements SQL. (NB there is some flag going on here in the FileMaker database so internal export gets 41,000 rows but script SQL SELECT COUNT(*) gets 200,000 rows for same table, but I don't think that is relevant to my question).
       
      Set Variable [$time1; Value: Get(CurrentTimeUTCMilliseconds)] Set Variable [$part_ca; Value: BE_FileMakerSQL ( "SELECT * FROM Contact_ACTIVITY OFFSET 100000 ROWS FETCH FIRST 1000 ROWS ONLY" ; "&≠≠&" ; "EOR≠≠EOR" ; "DataContacts11" )] Set Variable [$timer_seconds; Value: (Get(CurrentTimeUTCMilliseconds) - $time1) / 1000] MBS command I think would be something like:
      MBS( "FM.SQL.Execute"; "DataContacts11"; "SELECT * FROM Contact_ACTIVITY OFFSET 100000 ROWS FETCH FIRST 1000 ROWS ONLY" ; ...delimiters here I'm assuming.. ) We only have base FileMaker here on machine I am using, which can run the Base Elements plugin, but to run MBS plugin, needs FileMaker Pro Advanced to install it I think, am getting several databases in roughly same FM format where script workspace disabled, hence need to use SQL select run from script in my own external FileMaker file. Might consider getting FMP Pro Advanced if MBS is faster.
      Tx any suggestions!
×
×
  • Create New...

Important Information

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