• Resolved grungyape

    (@grungyape)


    We have an employee database that includes, among many things, empid. We then have multiple other databases that connect to this database via empid=empid and pull back static employee data.

    Because the interface we are replacing was hand coded PHP, we have many HTML drop-down forms that have <option value="empid">lname, fname</option> We use this to make add new entries, or make changes to the table for things like out of office, vacation, on call, etc.

    Easy to do in manual PHP, possible to do in WP Data Access?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @grungyape,

    Not sure if you mean multiple databases or multiple tables? You can let the plugin generate listboxes. Listboxes can show data from other databases and tables. Relationships can show data from other tables, but not from other databases.

    One thing… If you want to concatenate multiple columns in a listbox, you need to create a view and use the view to generate your listbox.

    This link will help you to get started:
    https://wpdataaccess.com/docs/documentation/data-projects/overview/

    Let me know if you need help,
    Peter

    Thread Starter grungyape

    (@grungyape)

    Thank you, I’ll give that a look.

    To answer your question, in this case, two tables. We have many that do this exact same connection.

    Table 1 Example “Emp Database”:
    empid,fname,lname,birthdate,hiredate,department, …
    112,john,smith,1999-03-15, …

    Table 2 Example “On Call”:
    empid,start_date_end_date, …
    112,2012-01-01,2012-01-07, …

    So when our manager needs to change the On Call Entry for 1/1/2012-1/7/2012 they go to the ON Call page, click the line entry for 1/1/2012-1/7/2012, hit edit and click the drop down list preselected to: <option value="112">John Smith</option>

    This gives them a list of all 50 employees:

    <option value="109">Bill Hardin</option>
    <option value="112">John Smith</option>
    <option value="123">Frank Lars</option>

    The display for On Call never shows the empid, it just has name and dates.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @grungyape,

    You can do this with WP Data Access. You can also save your manager a lot of time! The premium version has support for inline editing. This eliminates the need to edit each entry specifically. With inline editing you can edit table data just like a sheet in Excel. This is demonstrated here:
    https://wpdataaccess.com/docs/documentation/data-explorer/column-settings/

    Hope this helps,
    Peter

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Option Value and Display Value’ is closed to new replies.