Item field value not passing to model page in oracle apex - oracle-apex

I am selecting a value from select list field from PAGE-1, then clicking a button to open a model page (PAGE-2). Need to pass the select list field value from PAGE-1 to model page, but the value is not passing to model page. sometime the item field in model page (PAGE-2) displaying null and sometime displaying previous selected value.
PAGE-1->select List Item Field
->Button->Redirect to Model page no (PAGE-2)->Link Builder (p1_select_list_item = &p2_item.)
Note: using oracle apex version 19.1

Hm, are you sure you did it right? This:
Link Builder (p1_select_list_item = &p2_item.)
should actually be vice versa as you're opening Page 2 and should pass value from Page 1 to Page 2, so try p2_item = &p1_select_list_item. instead.
On the other hand, if that was just a typo, then cause of your problem might be the fact that P1_SELECT_LIST_ITEM's value isn't in session state.
A simple workaround is to
let the button submit the page
create a branch
... which will then redirect to Page 2
... and pass value to P2_ITEM

Related

How can I access list values in a WFFM list field?

I'm trying to make a poll results page with the results from a WFFM form. I initially took all the entered data(using AnalyticsFormsDataProvider), queried it, and then displayed the results. However, if no one votes for a particular answer, it wouldn't be in the entered data so it wouldn't show.
I want to display that the field had 0 votes, so now I'm trying to compare the possible answers to the queried list. However, I can't seem to find a way to access the values of the list items. Does anyone know the class those values are stored in and/or how to access them?
I'm using WFFM 8.1 rev. 151217 (Update-1) with MVC. It's a radio list field if that makes a difference from the other list fields.
Thanks,
You are able to get WFFM field as regular Sitecore item via standard API.
Available list items values are saved in "Parameters" and "Localized Parameters" fields. You can use Sitecore.Form.Core.Utility.ParametersUtil from Sitecore.Forms.Core to parse values saved in these fields.
This data is stored on your Radio List Field's Item in the fields Parameters and Localized Parameters.
If your code is within the Form's SaveAction or a Validator you will have access to the Field in the for AdaptedResultList args the SaveAction or via this.classAttributes["fieldid"] for the Validator. That will be enough for you to get the Radio List Item and then the Parameter fields.
If your code is not in a SaveAction / Validator I recommend passing the Form Item into your code possibly by Datasource and then retrieving the Radio List Item from that.
Finally the Items of the your Radio List field is stored in the format
<item><item>
If your radio items are actually items you will want to parse them using a regex
var regexItems = new Regex(#"<item>(.*?)</item>".ToLower());
var itemNodes = regexItems.Matches(FieldItem["Parameters"].ToLower());
Then you should be free to play with the list for your poll

DropList field in WFFM is showing value in message body

we have identified an issue/functional requirement that we have a droplist of countries and same goes for title like in below image
but we need that in response email body of send email save action it's Arabic text should be used instead of English value of selected option. Is there a solution or fix ? or we have to go for any customization ?
I don't think there is a way out-of-the-box to use the text instead of value. What you can do is create a custom "Send Email Message", similar to Sitecore.Form.Submit.SendMail and override the FormatMail method.
Create a list of countries items somewhere in the Sitecore Content Tree, and add a field for the text/description of the country. Then in WFFM droplist field, Set Items by: Selecting Sitecore Items and Select Root Item to the folder of the list of countries you created earlier.
You should see the countries in the preview section. Click the drop arrow for the Value and Text fields and then either select Display name or the custom field in your country item that holds the translated values.
The value submitted in form will now be the translated value correct for the language, using the lookup items list.

SharePoint Access App Filter default list view

I am using SharePoint access App and I have bind the left filter with Title field. By default, the list shows all the data including blank title. I want to filter the default list to show data only when title has value. I do not want to create custom action, because I want to hide this data from User.
Is there a way we can filter this data?
I found the answer:
I created a query to filter records where title is not null and updated the default view to pick records from the query.

Sitecore / WFFM : Text is stored instead the value

I've created a register page with WFFM(8.0 rev. 141217) in Sitecore ( Sitecore 8 Update 2)
I have a list of cities that the user can pick. ( dropdownlist )
I picked a certain field to be the text-value and a field to be the value-value.
When the user completes the form the text-value is stored to the profile-field, i need this to be the value-value.
Is this behaviour to be expected or did something go wrong ?
Edit: Added image
The postal code is what is shown in the Droplist.
But it is also the value that is saved to the user profile field.

How can I get the object value of a combobox in django view?

I am creating an app in django and to do that I have a form where the field 'Person' is a ForeignKey field. So, when I run the application it appears a form correctly showing me a combobox that lets me select the 'Person' object that I want. But the problem is when I try to catch the information in the view.
I send data with a POST method, so, when I try to get the value of the selected 'Person' object in the view I do the next:
selected_person = request.POST['person']
(Person is the field name)
I was surprised when I tested that the value of the variable 'selected_person' is a number (concretely, the number of the selected index of the element in the combobox).
My question is: HOW CAN I GET THE OBJECT VALUE OF THE SELECTED ELEMENT IN THE COMBOBOX?
Than you so much!
No, it is the primary key of the Person object in the database. So you can get it via Person.objects.get(pk=selected_person).
But really you should be using a Django form, which will then give you the Person object via form.cleaned_data['person'].
Also note, for clarity, this is a select field, or a drop-down, not a combobox; a combobox is a desktop widget that has both a drop-down and an edit field.
Concretely, the problem was I didn't have defined a "primary_key" value in the model, so, the number that the drop-down list gives me is the default primary key that django attached to the model. If I define a customized primary key for the model, the selection of the element in the drop-down list gives me the primary key.