This topic is locked

different lookup for add and list pages

5/7/2012 9:27:19 PM
PHPRunner General questions
M
mcappel author

Hello Everyone
I need to have a orders page whit the following format
Order Table

  • OrderID (autonumeric)
  • Status (draft, final)
  • product (dropdown of the products belonging to the user filling in the order table, linked by productID and displaying ProductName)
    Product

    -ProductID

    -OwnerID (userID)

    -ProductName (text)
    The user creating the draft can see only the products that belong to him on the dropdown menu of the order-add form (where products with OwnerID=UserID).

    Ones the draft order status is changed to "final" and send to the manager (another user that can see the orders in the order-list page that have status=final sees the order but...
    Now the problem as follows:

    1- I apply a filter in the Whereclause for the product dropdown field on the Order-add page so the user can only see his own products (this works)

    2- Now when the order-Status is "final", sadly the manager(other user) can see the order on the order-list page but the field product shows the productID and not the productName asosciated to it because the dropdown filter required for the order-add-page is not returning the productname, (is filtering it).
    Any Idea of how to solve this??
    Thanks

    MAC

Sergey Kornilov admin 5/8/2012

In PHPRunner 6.1 you have an option to setup field different way on Add/List/Search pages.

M
mcappel author 5/8/2012



In PHPRunner 6.1 you have an option to setup field different way on Add/List/Search pages.



Hello
Yes you have the option to set different pages. Actually I am testing the Trial version 6.1 to see if has what i need and I only see the following options:

  • In Add/Edit page i can set a field, in this case the product field, with a "lookup wizard" with the WHERE clause as required.
  • In List Page has not the option of "Lookup wizard" so I can not change the WHERE clause as i need it to shown the right values.
    May be I am missing something or I am trying to do this in the wrong way. Should I use another type or format. For example Custom view???
    Any recommendation?
    Thanks

    MAC

Sergey Kornilov admin 5/9/2012

I guess I don't understand this part:

"In List Page has not the option of "Lookup wizard" so I can not change the WHERE clause as i need it to shown the right values."
Please clarify what exactly do you mean while talking about Lookup wizard on the List page.

M
mcappel author 5/9/2012



I guess I don't understand this part:

"In List Page has not the option of "Lookup wizard" so I can not change the WHERE clause as i need it to shown the right values."
Please clarify what exactly do you mean while talking about Lookup wizard on the List page.


In the VISUAL EDITOR tab, When I double click in the ProductID of the LIST-Orders Form I do the following:

1- I select "use different Settings for all pages"

2- I select the ADD page as a "Lookup Wizard" with a lookup table (products) showing the ProductName and with a WHERE clause filtering to only show the records that the user can see.

2- Now I want to apply a similar "Lookup Wizard" for the List/view page that looks the same table (products) but now the WHERE clause must be different in order to show/convert the ProductID to ProductName to the displayed orders. THIS OPTION (Lookup Wizard) is not available for LIST/VIEW pages.
Any suggestion?

Sergey Kornilov admin 5/9/2012

On List/View pages you display data while Lookup wizard is an Edit control. Please clarify what exactly you trying to achive on the List page. Do you want to edit data on the List page?

M
mcappel author 5/10/2012



On List/View pages you display data while Lookup wizard is an Edit control. Please clarify what exactly you trying to achive on the List page. Do you want to edit data on the List page?


My questions is much simpler.
For the Order table (as defined in my previous emails) I edited the ADD-Page to have one of the fields(Product) in "Visual Editor, edit as" mode as "lookup wizard" that has (ProductID as Link Field and ProductName as Display field)and shows only a few records of the product table because the lookup has a WHERE filter (e.g. Where Product.OwnerID=$_SESSION[UserID]).
The problem comes when I log as another user (the manager) and try the Order List page for the same Order table. In the field PRODUCT it shows only the ProductName that are included in the filter (the same one as described above for the Lookup wizard) and only shows the ProductID (the link filed of the lookup wizard) for those that are not included in the same WHERE filter. I need to do something to be able to display the ProductName for these records too. any suggestion
Thanks

MAC

Sergey Kornilov admin 5/10/2012

Sorry, still not clear.
How do you want to display this lookup wizard on List/View pages. As a dropdown box? As a simple text value? As a list of text values?