Strange search issue occuring after adding field as Alternate search key - peoplesoft

I've added an alternate search key to our Vendor pages in FSCM. The search record for the page's component uses a SQL view that I modified, and added in the below custom (PS designated custom field) field (VNDR_FIELD_C30_B) into the view, as well as an additional field in the field list. On the Record Field's properties I set it as an Alternate Search Key.
This field now properly displays on my search page (I changed the label on it for be Employee ID) and I can properly search for a Vendor by inputting a SETID value, along with a value in the custom field. It will bring up the record appropriately, as shown below:
If I click the Return to Search button though, I am brought back to the search page as expected, however if I search for that same vendor again, (or any vendor for that matter) I am only brought to this partially loaded page, and all the other tabs you saw above for the Vendor are missing, as well as the typical bottom navigation/page functions.
I have to click on the page name again from the Breadcrumbs to refresh the page and then I can search for the vendor 1 time again, but on 2nd search I will encounter the same issue again.
Is there a reason this could be caused? Let me know if additional information is needed.

Related

HTML Select Not Showing Selected Option After Refresh in Firefox

TL,DR: Firefox (and only Firefox) fails to display the right select child element as marked with selected="selected" upon clean refresh of a page, even though it is correct in DOM (but only under certain conditions).
(I do not believe this is a duplicate of HTML select, correct option selected in DOM, but wrong item shown in firefox as I am not using ember.js.)
Background
I'm building a "software management/update server" in ASP.NET WebForms. It stores master copies of applications and serves downloads and updates via a simple API. Each application (or "App" as they're referred to in-code) has a DeptID and a GroupID, which are GUIDs, relating to respective Dept and Group tables. Each Group has a DeptID field also.
On one particular page, used for editing a chosen software application's details, NON-postback requests (.e.g., http://localhost/admin/app/edit.aspx?id=guid-here) will result in calls to the database to populate field data on the page.
In brief, the ASP.net runtime Page_Load event does the following:
Ensures that this load is not a Postback
Verifies than an id parameter was provided in the query string
Populates options in the ddlDept DropdownList (renders as HTML select element) from the Dept table
Pulls all fields from the App record from DB as matched by id into a DataSet
Populates options in the ddlGroup DropdownList (another select) from the Group table, matching the DeptID pulled from the App dataset
Populates the data for all form fields from the App dataset
Important to Note: When you click Save, the page is posted back to the server and field data dumped into the database. If the save operation is successful, the browser is instructed to redirect to the current page's URL using Response.Redirect(Request.Url.ToString), resulting in a "clean load" (non-postback load) of the page.
Expected Behavior:
After the page has been successfully saved, hitting F5 or clicking refresh should result in another clean load (non-postback) of the page, and all fields should be populated just like a direct URL hit on the page.
Actual Behavior:
After the page has been successfully saved, hitting F5 or clicking refresh reloads the page as a non-postback (verified in VS debug), but the ddlGroup select element renders the "default" / first item ("Select One") instead of the item marked selected="selected" in the DOM.
I have stepped through every single line of VB code in debug — and when the server sends the page back after this "post-save" and supposedly "clean" load, the ddlGroup value is correct in code all the way out the door. Only in the browser, and only Firefox specifically, is the displayed value set to the wrong item, even though it's right in the DOM. Refreshing again doesn't help at all. When I try to save again, the RequiredField validator for ddlGroup complains that the field isn't valid, even though, again, it's supposedly right in DOM.
This seems to me to be a very bad Firefox bug.
Thoughts?
So, this isn't really what I consider a proper "solution," but rather more of a stable work-around.
Adding autocomplete="off" to the offending select (DropDownList in the aspx markup) magically prevents Firefox from messing up the displayed element within the select, thus always showing the correct one that is marked selected="selected".
I've gone ahead and added it (and will add it) to all of my DropDownLists / selects from now on... thanks Firefox.

Track events of an excluded Page

New to Google Analytics-
I need to exclude a URL for a View but still need to track events from Google Tag Manager.
Situation: I have a page which loads dynamically with different content in the same URL. EX: Start,Step1,Step2,Step3,Finish.
I needed to track all these steps separate and create a goal funnel(without a required start page).
To track these I used Google Tag Manager to create Page Views(virtual) and but I had to exclude the actual URL since it was triggering the goals twice.
Issue is that, when I create a event (say a click) in the page, Tag manager is sending that to Analytics but there it is not getting captured since the url is excluded.
Is there any possible way I can track the events in that page without affecting my goals and using a single actual URL?
Note: I cannot stop sending PageView for that particular page as GA script is added to a global Layout file.
If I understand correctly you want to exclude the "physical" url for a pageview in favour of a virtual url, but still want to retain the events that are sent to this physical url.
From the top of my head I'd say create an "advanced" filter, set field A to request url and match the value of the url you want to exclude, set Field B to "hit type" and use "pageview" (you might have to check if that's the proper name, but it should be), and choose "custom field 1" as output field. Set the value for the output to "exclude", and make sure that the checkmarks for "Field A required" and "Field B required" are both checked. Should look something like:
Then instead of using you current exclude by url filter create a filter that excludes based on the value of custom field 1:
That way you only dismiss the pageviews, but keep the event, even if the url is the same for both. Untested, so may require a bit of tweaking, but the principle is sound.
However I don't think this is actually the way to go (it's just cool that you can do stuff like this). I think instead you should overwrite the page path field in your event tags with the path of your respective virtual pageviews. That way you don't need filters, and it makes for better reports.

Gravity Forms Multipage Form, dynamically populate from existing form entry based on unique key

I'm working with Gravity Forms (WordPress) on a pair of forms for a school. They have an initial form for applications. Each submission gets assigned a unique five character key to identify it. This is saved in a hidden field. This form has things like name, email, phone, address etc. This form is up and running, working great.
Once a student has been accepted, we now need to have another form that is for registrations. This form will be a multipage form with more detail and various questions about history/parents etc. My thought is that the first page contains a single field that asks for the key assigned to their application. Once this first page is submitted, the form would query the database based on the key and return any info from the original application that applies to the second form. So things like name, email, phone wouldn't have to be re-entered manually.
I'm starting down the road of dynamic population and running into some trouble. It appears things operate differently on multi-page forms, and depending on whether you're using AJAX or not. Has anyone had experience doing this kind of key lookup for form population? I could do this in vanilla PHP/MySQL without a problem, but the Gravity Forms stuff has me stumped.
Your question is not clear enough and is left open for interpretation. However, since I ran into problems with multi-page gravitiy forms as well, and could find very little help online, here is my experience.
If you go from one page to the next, you can access field values from previous pages using rgpost("input_" . YOUR_FIELD_ID);. Checkbox collections are accessed by "input_".FIELD_ID."_".OPTION_INDEX. Dynamically filled dropdowns seemed to get reset in my experience. If this happens to you, before moving to the next page, you can copy any values from these fields into hidden fields, and read from the hidden fields.
Fields that already have a default value (field->defaultValue) are NOT updated even though the appropriate hooks are triggered. E.g: add_filter('gform_field_value_my_field', 'populate_your_field'). A dump of the value you return in populate_your_field will show a different value than when you inspect my_field, which is supposed to receive this value. my_field will retain the first value it received and wont change anymore.
This is a problem when your fields depend on input of fields from previous pages, and users go back and forth changing those. Your dependend fields wont update on any hook. I've tested extensively with gform_field_value, gform_pre_render, gform_field_validation and gform_post_paging.
I found one solution: echo a hidden div with data attributes in the gform_pre_render hook, and populate the fields through javascript.
add_filter('gform_pre_render', 'dynamic_population', 10, 1);
function dynamic_population($form) {
echo "<div id='my_data' style='display:none' data-myjsonarray='.json_encode(my_json_array).'></div>";
}
In your gravity form, you can create a html field and add javascript in there.
<script>
window.onload = function() {
//custom function that fills given gform dropdown with given array
fill_dropdown(
jQuery('#input_1_1'),
jQuery('#my_data').data('myjsonarray')
);
}
</script>
Hope this somehow helps someone.
Gravity Forms Populate Anything can handle this really well.
Add a field to your form where the user would enter their reference number.
Configure a field to be populated with the entry data based on the provided reference ID where it matches an entry that has the same reference ID:

multiple updates in one submit in SPA page

I have a web page written in ASP.net where it finds a list of employees, displays them in a listview and allow the user to change different statuses for each employee.
On each row I have employee information like name, date of birth, address and then 4 status fields that are displayed as checkboxes and a comment field where the user can type a comment explaining why they changed a certain status.
Currently in Listview, there is an edit, delete button when they click edit, the checkboxes and text field are displayed the user updates them and click save.
asp.net will do a postback to save the changes for this row and then fetches the data again to refresh the list.
The problem I am having is the list is very large (more than 3000 names), so I am using pagination to show 50 to 100 names on each page. This is still a big performance problem because after every line update a query needs to run to fetch those names again, and with ASP.NET the server is generating the html and passing everything to the browser.
The customer wants the page to be mobile friendly too, so I am thinking to redo the page using Angular on front end with web-api or mvc.net on back end that returns JSON.
My question is there an easy way to do this and allow the user to change the status for multiple employees on the same page at once and then click one submit to update all the changes? if I do it this way, there will be less queries to run and it will be faster for the user because they don't have to wait after every line update.
Any examples will be greatly appreciated, unless there is a different way to implement this, in this case please let me know.
I have a thought that may work.
On load render names and use pagination.
Then use ajax to send the post to server and change data in database.
When editing has returned successful then only change the values that have been edited using javascript for the user to view.

Read hidden field values from another page

I am developing a website using ASP.net.
In my home page I have 14 tree view controls. They were placed under Jquery tabs. So when a user click a tab it only appears one treeview. So in tree node changed event currently what I am doing is passing the values from query string to another page. this query string doesnt have any sensitive data. I have to pass what is the selected Tab Id and selected tree node Id.
Response.Redirect(String.Format("~/Display.aspx?tab=1&type={0}",treeview1.SelectedValue), true);
But you know URL is ugly. I dont want to use Friendly URL thing now.
So what I did was I put 2 hidden fields values in my home page and I set them when I click the tree node.
So then from the source page I used this code to acess this.
if(Page.PreviousPage!=null)
{
string tab= Page.PreviousPage.FindControl("hftab").UniqueID;
string Type= Page.PreviousPage.FindControl("hfType").UniqueID;
}
But Page.PreviousPage always return NULL. So how to solve this probelem without using sessions and query string. I just want to pass two non sensitive data behind the scenes.
IF this is about Cross page postback thing How to do this cross page post back in node change event? Is it ok to do a Cross page post back for to get only 2 values that I needed?
The method you are trying is only possible with "Cross page posting" mechanism. When you set PostbackUrl property of a server control like button, and set the PreviousPage property of Page directive on destination page; then only you will get Page.PreviousPage values.
Here are some reference:
1. http://www.codeproject.com/Tips/604553/Postback-and-Cross-Page-Posting-in-ASP-NET
2. http://www.aspdotnet-suresh.com/2010/05/cross-page-post-backing-in-net.html

Resources