Jump to content
  • 0

How To Enter Empty (Null) Into Table Field With Relationship From Data Page


RichardAukland

Question

Hi, hope you can help

 

I am getting "data integrity error" when using a dropdown list to enter a value for a field that is in a relationship. Basically I want to give the user the chance to enter nothing, i.e. NULL, i.e. not pick anything from the dropdown list. But this does not seem possible on a data page, even with an additional custom value set to empty. So, how do you default to no value when editing with a dropdown?

 

The same problem doesnt seem to exist in when i enter data directly into the table in bridge. In such circumstances there is no obligation to pick from the dropdown list

 

 

Thanks

Richard

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Thanks for the suggestion MayMusic,

 

However it is not the primary key field I have a problem with, its the foreign key field. I dont seem to be able to have an empty value in the foreign key field when using a Data Page, only when editing a table directly.

 

I dont understand why nobody else has mentioned this, perhaps I am missing something. I would have thought it was a common thing to do. The only workaround I can see is to have an additional value in the lookup table for "Unknown" 

Link to comment
Share on other sites

  • 0

That is true in fact you should not be able to leave parent blank since it interferes with referential integrity. So it should a bug in the system that lets you leave it blank in table sheet.

 

You do not want to have orphan file and that is why you are having this option checked.

Link to comment
Share on other sites

  • 0

 Ah OK, thanks MayMusic. 

 

Not sure I would call it a bug though. In SQL Server and many rdbms it is quite a normal scenario  to allow NULLS on fields involved in relationships as a foreign key. In fact, I am very surprised this is not implemented by default in the DataPages of Caspio, and I would say the bug is more likely the other way around - the tables are behaving correctly, and the DataPages incorrectly. But I am not a Caspio expert, just someone from a db/programming background. 

Link to comment
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
Answer this question...

×   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.

Loading...
×
×
  • Create New...