Main Region

Application level item in grid select row
2 answers | 375 views

ER
Mar 13, 2014 20:35 +00:00

Hello everyone, hope you're having a great day.

In a FOEX Grid Select Row [Plug-in] we can select a row by column value, enter a column name: ID, and then, in the value field, enter a page item such as #P200_TEST# that will specify the ID in the column that we want to select. Using this we are able to change the row selection dynamically.

We would like to use an app-level page item in place of P200_TEST. The plug-in doesn't seem to like this idea, we tried :P200_APP, #P200_APP#, &P200_APP., and just plain out P200_APP. It seems to be disconnected from this app-level item in some way. How do we make this work?

Thank you.

Eric

3 comments

ER
Eric Mar 13, 2014 20:53 +00:00 

Good stuff. I'll look into that. Thanks Matt.

MN
Matt Nolan Mar 14, 2014 20:51 +00:00 

You need to debug this by checking the page to make sure the page item exists on the page where this grid select row is not working.

Run the following in the js console to see if it exists: $x('P200_CLIENT_ID_DRILL')

Run the following to check the value $v('P200_CLIENT_ID_DRILL')

If the item does not exist or the value is "" then you found your answer why.

ER
Eric Mar 17, 2014 15:26 +00:00 

You are correct, the page item doesn't exist on page 200, and also has no value. We are going to table this until there is more time to understand global pages and such. Thank you for your help Matt.

MN
Mar 13, 2014 20:47 +00:00

You need to understand that #ITEM_NAME# syntax refers to client side substitutions. This means that there must be an input item on the page for the value to be substituted. Page items work because they are outputted on the page as an input item. Application items on the other hand are not, they are not included on the page, they merely act like global variables in a PLSQL context.

Perhaps using page zero page items would be the way to go if you want the item shared across multiple pages. You can even omit the P0_ prefix if you wish.

0 comments

ER
Mar 14, 2014 16:06 +00:00

alt text

Hi Matt, this still doesn't work. A little explanation is in order: we had P200_CLIENT_ID_DRILL on page 200, and it was tied into virtually every other page in our app. We found a use case where it would be necessary to use this identifier globally. The idea is that by keeping the name of this identifier the same, but moving it to a global context, we won't have to change every other reference to it on the other pages. What you see above is exactly the same as before we deleted P200_CLIENT_ID_DRILL from page 200 and moved it to page 0. It worked then, but not now. Also, P200_CLIENT_ID_DRILL is updating in session state just fine, and our app is working the same as before the change, besides this specific Select Row action of course, and you probably noticed that this is a false condition, which is what we want, and we have checked that the false condition fires. Thoughts?

0 comments

You must log in or sign up to post questions and answers.