Data object relationships

Thanks Mark.
I was able to achieve what I wanted with your (and Sergey and Ohla’s) help- thank you so much.
I will keep working and hopefully be free of questions for a while.
Rick

Hi all.

Quick question- can regular expressions be used in where clauses to search a database in REST API?

I want to filter a repeated list by one, two, or three variables via where clauses.

I was thinking if I want to filter the list by the first where clause only I could set up regex for the other two to contain all possible values for the second and third where clauses.

If I want to search by the first AND second where clauses I could set up a regex to contain all possible values for the third where clause.

Etc.

Thanks.

Could you please provide a sample data set (in a screenshot) and describe what specific data you want to get?

Thanks for replying. I’m need to figure this one out a bit more before asking for help. I’ll circle back thanks!

Hello.

It has been a while since you all helped me successfully use the deep-save function to add related objects to my parent “Customer” table. The two related schema columns in my parent table were named ‘subsidary’ (related to child table ‘Subsidary’) and ‘location’ (related to child table ‘Location’). The child tables are reference tables (their values do not change and nothing is added to them).

(Yes, eventually I should change the names to subsidiary :confounded:).

Now I would like to make things more complicated.

My “Customer” table now has 4 schema columns named ‘subsidary_1’, ‘subsidary_2’, ‘subsidary_3’ and ‘subsidary_4’ each related to the same ‘Subsidary’ table and 4 schema columns ‘location_1’ etc each related to the same ‘Location’ table.

Is using deep save to add 8 (4 + 4) related objects to my “Customer” table any different in concept then adding 2 (1 + 1)?

And I’ve attached an error message that I got when I tried to do the more complicated deep-save function. Would you be able to guess what my error is?

Thanks.

Hello @Rick_Bo

The error indicates that you are using the wrong data type when adding the relation. Can you send us the request you are sending?

Regards,
Inna

Thanks.

I am using AppGyver as my UI builder and using REST API with Backendless so please forgive me if the question below does not make sense:

Question: when I use the deep-save function, can I add an object that contains both related and non-related data?
Scenario: I have a ‘Customer’ parent table and two child tables ‘Subsidary’ and ‘Location’

The user enters the following data:
first_name
last_name
DOB
company_1 and company_2 (which are columns in ‘Subsidary’ child table, which also has columns ‘ann_income_1’ and ‘ann_income_2’)
location_1 and location_2 (which are columns in ‘Location’ child table, which also has columns ‘pop_density_1’ and ‘pop_density_2’)

I have a deep-save HTTP call to a table ‘Customer’ with the following data payload:
{
“first_name”: pageVars.customer.first_name,
“last_name”: pageVars.customer.last_name,
“DOB”: pageVars.customer.DOB,
“ann_income_1”: pageVars.subsidary.ann_income_1,
“ann_income_2”: pageVars.subsidary.ann_income_2,
“pop_density_1”:pageVars.location.pop_density_1,
“pop_density_2”:pageVars.location.pop_density_2,
“ownerId”: outputs[“Get record”].record.ownerId,
“initials”: outputs[“Get record”].record.initials,
“subsidary_1”:
{
“company”:pageVars.subsidary.company_1, “objectId”: pageVars.subsidary.objectId_1
},
“subsidary_2”:
{
“company”:pageVars.subsidary.company_2, “objectId”: pageVars.subsidary.objectId_2
},
“location_1”:
{
“state”: pageVars.location.state_1, “objectId”: pageVars.location.objectId_1
},
“location_2”:
{
“state”: pageVars.location.state_2, “objectId”: pageVars.location.objectId_2
}

}

When I execute the deep-save to the ‘Customer’ table, everything is added correctly except 3 data items: the first three variables (first_name, last_name and DOB), which are straightforward page variables (no related data) entered by the user.

Would you be able to help see my error with the data payload above ?

Thanks

Sorry for sending the email without me first double checking my work. I was able to figure this out - I had incorrectly linked one of my variables. Thanks!