Adding a Many to Many not referencing correct parent

Requests.PR_NO is the key
USERS.USER_NO is the key

Prayed table has both PR_NO and USER_NO referencing their parent table

When I go to add a new child from the Requests form, it brings in the values for PI_NO which is another referenced field in the Requests table. I cannot figure out why.

If I manually add the correct PR_NO in the data source, then the child correctly appears.

Any tips on where to look for my error?

Thanks.

What does “it brings in” mean? Are these values in a dropdown?

yes. Though it shouldn’t be.

Could you show us the expression you are using in the Valid_If property of the “PR_NO” column?

1 Like

That table is Read Only in this app. I don’t have a valid if statement on PR_NO.

Which table is Read Only?

Ok, can you show the column definition of the PR_NO column in the requests table?

1 Like

Requests and Users are both Read Only

Prayed has Adds, Edits and Deletes

Thanks for your help.

I’m a little confused by this statement then. If the Requests table is Read Only, you would not be able to open a Form to that table.

EDITED: Oh, you must have meant the Prayed table?

So, let’s back up a bit. Since the Form was from the Prayed table, I’ll re-state my question.

Is there a Valid_If expression for the PR_NO column in the Prayed table?

If so, can you show that?

If not, then that means that dropdown is pulling ALL values based on the slice “View_All_Requests”. Can you show the table definition that slice is based on AND a sample of the actual data from that table?

Let me show how it is set up, then I’ll get the specific info you asked for.
Viewing existing requests.
Screen Shot 2020-04-23 at 2.23.06 PM

When I click add New, The PR_NO is showing PI_NOs. And shouldn’t be editable. I’m only showing it since I saw it wasn’t being done correctly.

There is not a Valid_If expression for the PR_NO column in the Prayed table.

View_All_Requests Row Filter: AND([Start_Date]<=TODAY(),[END_Date]>=Today(),[FINAL_OK]=TRUE,[Confidential]<>“YES, Never share publicly. For Jesus Film Family Only.”,ISNOTBLANK([DISPLAY_VERSION]),[DISPLAY]=YES)

And you wanted data from View_All_Requests?

Yes, and now just missing the View_All_Requests table definition. But really just need to know what column is set as the Label column in that table?

3 Likes

View_All_Requests is a Slice based on the Requests table.

OH MY!!! I had PI_NO as the lable for the Requests table, NOT PR_NO. That fixed it.

I wonder if that messed anything else up? When is a label used? This is the first time I’ve done many to many in this App.

Thank you so very much? You are a great detective!

1 Like

Well done, @WillowMobileSystems!

3 Likes

Thanks Steve.

1 Like