scott smiley
Posts: 0
Joined: Wed May 21, 2014 7:20 pm

lookup related fields from collections for pointer value

We need a way to set pointer values in forms from lookups from other collections. Tables are related and in order to use for business applications - we need to be able to lookup related data and let user decide selected. Perhaps a lookup button next to a field and let us define which fields will be used for query, which table in collection and which field in the form to return the pointer to

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

lookup related fields from collections for pointer value

Hi Scott -

Thanks for your idea, we will ask our developers team if this is possible.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

lookup related fields from collections for pointer value

Could you please clarify, what exact use case do you mean? Perhaps you can share with us screenshots where exactly you want to see this inside the visual builder.

scott smiley
Posts: 0
Joined: Wed May 21, 2014 7:20 pm

lookup related fields from collections for pointer value

Illya,

Tables are related and business applications need to lookup and store values from other tables. The classic example is customer, order, orderdetail, product. This is hard to do in appery.io but could be easy. IF we could map a form field which represents a pointer value to another collection table and have the script automatically generated

  1. to display a lookup form and allow user to select the parent value (to make this more useful allow the user to select which field is shown in lookup which is different that return value. Show name and description but return the _id value.

  2. store id value in localstorage variable

  3. map localstorage variable to form variable

    You could implement this as another button control called lookupControl. Users would put a lookup button next to every pointer form field. The mapping would take place on the events of the lookup button

    If we had this simple capability – we could write a host of business applications easily and the number of applications on appery would explode.

    Customer
    _id
    Name
    Address
    ******************************************
    Order
    id
    Customer_id (Add lookup button that allows user to lookup Customers by Name in a dialog box or another screen and map the return value of Customer.id to this field Order.Customer_id)
    Nbr
    Date
    Total
    **********************************
    OrderDetail
    id
    Quanity
    Order_id (Add lookup button that allows user to lookup Orders by Nbr in a dialog box or another screen and map the return value of order.id to this field OrderDetail.order_id)
    Product_id (Add lookup button that allows user to lookup Products by Name in a dialog box or another screen and map the return value of Product._id to this field OrderDetail.Product_id)

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

lookup related fields from collections for pointer value

Hello Scott,

For now we do not plan to add this functionality.
You can do it with Pointer type.

Return to “Issues”