User Request : Doing a Self-Lookup, that references record from the same form

James wanted to know:
How do I add a look-up field on a form that references records from the same form (i.e., in the same table).E.g., I have a form called Case and I wish to relate a specific Case to another Case in the same table so that I know they are related.Another example is that I have a People form and I wish to show that a person is related to another Person with a parent/child relationship.
So, here we go ……
Response:

  • We cannot use Lookup-field to reference data on the same form.

There is a workaround, and we will be using that instead.
Working DEMO here.

THE FORM

  1. Instead of a “Lookup field”, we will be using s a regular “Drop down field”
  2. Leave the default list-options as they are, we will not be using them
  3. Instead, we will be adding the “self-lookup-values” at run-time

THE CODE

  1. Using the “Aggregate Records” function, we will collect distinct values into a “list-variable”
  2. We now add these to the drop-down field


Hope this clarifies. Do let me know if you require additional assistance.

Zoho Creator User Request: Different Send Mail scripts based on user Entry

ZohoCreatorCymantha has requested:
I would like to send an email to a specific person
if when the form field “company” contains the company
that this particular person works for.
If a different company then just the regular email would go out.

Response :
Working demo here.
So, here is how this works.

  1. Default Form : Partner Registration.
  2. Default Send Mail Script :
    1. This is something that you want to send out irrespective of “Company Name”.
    2. That includes a Mail subject & Mail message body that’s relevant.
    3. Special Send Mail Script
      1. Identify the company and email to which you wish to execute this action.
      2. Eg: If the “company Name” is MICROSOFT, then a mail to mike@microsoft.com
      3. Have the Mail Subject and Mail Message body that suits this condition.

After setting up the form,
Form Actions > on Add > Submit.

  1. Set a variable & convert the user-entry at Company name to avoid case sensitive errors
  2. Use the IF Module & Else Module to specify your condition
  3. Use Send Mail Modules within these IF & ELSE .
    1. For demo, I have used the form’s email entry.
    2. But you can hard code the email as well
    3. Use appropriate text for special mails & Regular mails


Save and access the application
Hope this answers your query.
Do free free to drop your followup thoughts at the comments section