Set Object Relationships With API Mission not working as expected

Hello!

When I create the person, I see it in the Person file, but when I click the Create Relation Between Person and City button, the relation is being set. I have to click that button twice for the relation to be set in the database.

Can someone tell me where I’ve messed up?

Here are some relevant screenshots:







Hello @Jeff_Bianchi

Before I respond to this topic I have to make it public. Private topics are reserved for customers with paid support. Just wanted to make sure you are aware of the policy.
When you click the “create relation” button, is the request sent? Can you share your APP ID with us?

Regards,
Inna

Hi Inna,

No worries about making it public. I see no errors in the Chrome console that indicate an error when clicking the button.

APP ID is: VOMarketingPro

Thanks!

Jeff

You sent the app name, but the APP ID is at Manage>>App Info.

Sorry, Inna. Here it is: DEF352F3-2C22-92BC-FF2F-C39492B3BE00

I just created a “backendless” user, then found a city and clicked the “Create Relation” button 1 time, then I opened the Person table and the relation was added.
If my steps are wrong, please describe how I can reproduce the problem.

I think I see the problem. When I searched for a City I clicked on the Select field to select the city that was in the field. I then clicked the Create Relation button. I think this first click set the focus on the Create Relation button, but didn’t actually click it. Only when I clicked it a 2nd time did the on-click event fire.

Is there a way to make the buttons ‘focused’ all the time so that there isn’t the need to set the focus on the button before the on-click event fires?

Does that make sense?

Hi @Jeff_Bianchi

try to add a Print block into the OnClick logic to check if it doesn’t run on the first click

Sorry, Valdimir. That’s over my head at this point. How would I do that?

Here’s a video showing how to use the print block:

That made perfect sense, Mark. Thanks so much. I added the print logic to both buttons (create person and create relation) and I can definitely duplicate the issue at will.

I do, however, believe at this point that it’s a minor issue that doesn’t need any more investigation.

Thanks again!

Hello @Jeff_Bianchi,

Could this topic be closed?

Yes, it can! Thank you.