Edit Child record from the master Table. I have reviewed many posts but they just don't work, same error message "No Such Operation. This operation does not exist."

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

Here is the latest version of my code:

URLRoot() & "db/" & [_DBID_RESOURCES]&"?act= API_EditRecord"

& "&_fid_8=" & URLEncode ([A-ID])

& " &_fid_68="&  URLEncode([Date-Completed])

&" &_fid_99="& URLEncode ([A-Status])& URLRoot()

& "db/" & Dbid()& "?a=dr&rid="& ([A-ID]).

Can someone help?


Photo of Piriye

Piriye

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Piriye,
Your post says that you want to edit a child record from a button on the Parent record.  So say there is 1 parent and it has 100 child records.  Which one is to be edited?

Mark
Photo of Piriye

Piriye

  • 0 Points
Thanks Mark, the record will to be edited is the related record i.e the one with rid= ([A-ID])
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
I can help you but let me know if this button will be on the Parent or the child record (I assume that you want a button on an embedded report of children on the Parent record), and where you want to refresh to after the edit.
Photo of Piriye

Piriye

  • 0 Points
Yes, I want the button on the Parent Form, thanks much.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Can you tell me what is the DBID Name of the Parent and what is the DBID name of the child?  And where do you want to refresh to after the edit?
Photo of Piriye

Piriye

  • 0 Points
the DBID name for parent is [_DBID_CLIENT] and the DBID Name for child is [_DBID_RESOURCES]. I want to refresh back to the Parent. Thanks.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Something does not make sense.  You said above that you want the button on the Parent.  In fact I believe that you want the button on each individual child record on the embedded report on the Parent form.  So the button will be on the child record, right?  And the record to be edited is the child record you are on right?

Also, I am confused as to which record you want edited, the Parent or the child.

I think we sort of need to start over.  rather than me trying to help with the formula you have posted, can you explain in English what your situation is as to what you are trying to accomplish.  Also please clarify in your response what is the name of the [Record ID#] field on whichever record you are trying to edit is.  You seem to be saying that you have renamed the [Record ID#] field to be called [A-ID]. That is possible, but unusual.
Photo of Piriye

Piriye

  • 0 Points
Thanks Mark and sorry for the confusion.  All I want to do is this: I have a parent table with attached child records. The parent table is a project and the child records are resources that were contacted for the project. Eventually only one resource works on the project until completion. When the project is completed, the Parent record (the Project [_DBID_CLIENT] ([A-Status] and ([Date-Completed]) is updated to "Completed" status and Date Completed, the specific child record (the Resource [_DBID_RESOURCES] = fid_68 and fid_99 ) Status and Date Completed also gets updated by copying the data from the respective fields on the Parent Table. My Thought is to have a formula button on the Parent Form that when clicked, updates the child record with the new status and Date Completed. Its still okay with me if the button appears on the window of child records. Hope this helps. Thx.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
If the Resource is a child of the Project, why not just use a lookup field in that relationships so that the Status and the Date Completed on the Parent Project record are looked up down to the child.  Why do you even need a URL formula button at all?
Photo of Piriye

Piriye

  • 0 Points
You question is what we are currently doing, but the project coordinators want to the child records automatically updated once the parent record is updated without them having to open the child form.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
As soon as they make the edit on the parent, the child record's lookup fields are instantly updated.  You do  not have to edit the child records to get them to update.
Photo of Piriye

Piriye

  • 0 Points
I hoped for that to happen, but it only opens when you separately save the child record. We want it saved behind the scene once the button is clicked.
Photo of Piriye

Piriye

  • 0 Points
sorry, I just checked, we have been using a report link not lookup field. I am trying to see possibility of creating lookup field right now
Photo of Piriye

Piriye

  • 0 Points
I found that Lookup will work if the _DBID_RESOURCES is the parent table, but in this case _DBID_CLIENT is the parent.
Photo of Piriye

Piriye

  • 0 Points
in my original formular you will notice that I have URLRoot() & "db/" & [_DBID_RESOURCES]&"?act= API_EditRecord, I want to edit the _DBID_RESOURCES table by invoking API_EditRecord on it.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
You said that you are updating the Parent Project Status and Date.  You say that you want to update the child to have those same values.  Just use lookup fields.  Go to the right side of the relationships to "Add Lookup Fields"
Photo of Piriye

Piriye

  • 0 Points
I now see what you mean. We do have both the Status and Date Completed fields pulled from the parent table as lookup field (and use them for comparative analysis). But they will hold "true for all" the child records. We want the "specific child record" of the resource that Completed the project to be updated as Completed.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
How do you know which child record completed the project?  Does that information exists somewhere on that child record?  Is is this URL button what is supposed to flag the child as having completed the assignment.
Photo of Piriye

Piriye

  • 0 Points
That's a good question. I now realize a missing piece. The usual case is for more than one child record already attached to the parent record prior to start of the project, however only one child is changed to "Started" status. It is this specific child record that would be changed once the button is clicked. My formula above if it had worked would have probably changed all of the child records.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
The use a formula field.
IF([child status]="Started',[Lookup status field from Parent])
Photo of Piriye

Piriye

  • 0 Points
OK, that simply? I will try it once I get back from lunch and update you. Thx
Photo of Piriye

Piriye

  • 0 Points
Thanks much I got it working now. Your questions and formular, sort of ginger my brain to think of trying out something else. I had created a grid edit report link to display relevant fields from the child related child records. I found that if I changed the Status and Date Completed fields and save using the "Save Button" on the Parent form, Quickbase saves all the changes both on the parent and child records. I never tried this before because we always go into the child form to edit the records until this request came. Amazing. Thanks for helping me to arrive at the solution
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
OK, I'm glad you found a solution you were happy with. Note that in grid edit mode on a parent if you allow the child table to be "editable" on the form property, you can add a parent and children in the same initial Save when the parent is being created. Nothing to do with your current problem, but just FYI
Photo of Piriye

Piriye

  • 0 Points
Thanks. The is really great to know.
Photo of Piriye

Piriye

  • 0 Points
Regards