Go to http://goo.gl/I4XLKF (Link to my jsfiddle workout)
Here I have tried to increase the input fields/option for Firebase LeaderBoard (https://www.firebase.com/tutorial/#example/leaderboard), But it is Not working.
I have defined 3 Inputs/Firebase elements
name - this element/child is for the name of website
AlternateURL - this element/child is for the URL of website
Score - this element/child is for setting priority to the URL by entering numerical values.
I am using this LeaderBoard script to allow my users to sumbit alternate url for the various apps.
I think in this section, you only need to use the name field to reference the row and not your alternateurl.
// Store a reference to the table row so we can get it again later.
htmlForPath[scoreSnapshot.name()] = newScoreRow;
htmlForPath[scoreSnapshot.AlternateURL()] = newScoreRow;
get rid of the last line.
Unless there is an error somewhere else, you've addressed the areas to change/add code (variable names are my version:
<input type="text" id="urlInput" placeholder="URL">
newScoreRow.append($("<td/>").text(scoreSnapshot.val().url));
var url1 = $("#urlInput").val();
userScoreRef.setWithPriority({ name:name, score:newScore, url:url1}, newScore);
Related
I'm setting up a PrismTabbedPage dynamically in Xamarin.Forms. I have a content page PrismContentPageProfile which shows the profile of a given Id. The Id I want to pass with a parameter. Problem is that each initialize is having all the parameters.
await NavigationService.NavigateAsync("NavigationPage/PrismTabbedPage1?createTab=PrismContentPageProfile?Id=Michel&createTab=PrismContentPageProfile?Id=Erik");
I expect to tabs. One for the profileId Michel and one for Erik. Problem is that the paramters in the Initialize look like this on each page:
{?createTab=PrismContentPageProfile%3FId%3DMichel&createTab=PrismContentPageProfile%3FId%3DErik}
As I don't know which tab I am, I don't know which profile to load.
I hoped that calling:
await NavigationService.NavigateAsync("NavigationPage/PrismTabbedPage1?createTab=PrismContentPageProfile?Id=Michel&createTab=PrismContentPageProfile?Id=Erik");
would result in different parameters on each page. Id=Michel on the first page, Id=Erik on the second.
Or, if that is not possible, that I know which tab index I am. Then I can read the related parameter.
I am looking to create a dynamic/tracked link from a supplementary tabled based on product ID.
The URL format is:
https: // site.com/product/{$id}
Using the ${clickthrough('my_products',table.id)} method hasn't worked. The resulting URL, while tracked doesn't transform the ID parameter and results in a broken link.
Would like to know, what the clickthrough function should be and what to include in the link table.
Thanks,
Your URL format needs to be updated to:
https : //site.com/product/${id}
Then you need to add the parameter table.id to pass through to id (RI will recognize id as table.id most of the time, so this is unnecessary unless you're coding the URL in a <#data> loop where the field is aliased):
${clickthrough('my_products', 'id=' + table.id)}
Or you could just change ${id} to ${table.id} to call the field in directly so you don't have to code the parameter in the clickthrough:
https : //site.com/product/${table.id}
${clickthrough('my_products')}
I have not seen any discussion or awareness so far that Firebase does in fact make available a unique identifier--in fact the full URL--to each specific data record via their "snapshot" which they return, i.e. the wrapper around the data record (accessed via snapshot.val()). By doing a basic property examination of the snapshot I discovered that the unique URL is available (see examples below). However, it seems that, for some reason, Firebase keeps changing the name of the key every few days, causing my application to break. I have to go in and re-discover the new URL property key and change it so that it will work again.
Here are three examples of how I have seen the key change so far. Each value is the same, but the key keeps changing over time (i.e.: "Wb", "Xb", "bc").:
getMemberBySnapshot - snapshot has prop Wb with value https://prototype1.firebaseio.com/users/-IwohKfw1l5F3gFqyJJ5
getMemberBySnapshot - snapshot has prop Xb with value https://prototype1.firebaseio.com/users/-IwohKfw1l5F3gFqyJJ5
getMemberBySnapshot - snapshot has prop bc with value https://prototype1.firebaseio.com/users/-IwohKfw1l5F3gFqyJJ5
I have read Firebase's suggestions that developers should use an email address if they want a unique key (what if my model does not use an email field? What if a user wants to change their email?), or Firebase suggests altenatively to retrieve all existing records and then search through them on the client. Neither of these solutions are satisfying. But I'm seeing that they do provide the unique URL to each data record in the 'snapshot'. Why do they not provide a stabilized key so that a developer can call it consistently???
Firebase.js is a compiled script. The names of internal variables will change every time we compile it and release a new version, so you should definitely not be relying on any properties that are not documented on our website.
For your specific case, you should be using:
snapshot.ref().toString()
in order to get the URL.
I am trying to change the filters in the display of the current user in the Defects module.
I have set the "tdc.BUGFactory.Filter" object with my filter and i can access the data, but i cannot force it to be displayed to the user! any idea on how to do that?
If i use a SQL command to store it in the common settings table, would it be possible to call an action to load the "Favorites" view i created to the user?
Thanks,
Achraf
================================================================
I found the answer, however stackoverflow doesn't allow me to post it:
I fonud the answer through SQA Forums, to force a filter you use the following
Set defectFilter = tDConenction.BugFactory.Filter ' Example to set a filter criteria
defectFilter.Field ("BG_DETECION_DATE") = "[Today]"
SetDefectsFilter defectFilter.Text
Set defectFilter = Nothing
There is also a function called GetDefectsFilter() which gets the current filter
I am designing an infopath (Change Request) form:
1)How can i add a text box that automaticaly increments to the next number when a new form is created (adding a new Change Request form to the form library).
2)How do i retrieve information from an existing form to the new form.
NOTE: The field is not inside a repeating table. I need to generate the next Change Request number on each new Change Request form.
TIA!
There is no build-in way to do this, but there are several ways to achieve what you want (Database query or SPList query). But this kind of request somehow smells like a workaround for an other problem.
Common cases for increasing numbers are:
unique IDs
count the Requests
make referable by external list (same as ID)
make IDs guessable (time stamps are not)
If you need an ID: In most cases you are not forced to use integer IDs. Simply use the form title as a natural ID. (e.g. customer + timestamp)
If you need guessable IDs, you need them because an external system wants to access or refer to the request. In that case try to change the pull-direction into a push-direction (e.g. by using workflows) or let your other system provide a "getID" function that can be called by your form to obtain a known ID (no guessing needed).
Anyway - for me, it looks like you want to achieve this to solve some other problem. Maybe there are different solutions for that problem too?
You could enter a token in your text-titles on the form where you want autonumbering, such as #num#, and then use javascript or jquery to find those tokens and replace them with incremented numbers.
The drawback to this is that if you exported the list to excel, the tokens would not get translated to numbers. But it is a good solution for on-screen rendering.
Use Firebug to figure out the class of the container housing your autonumber tags.
Maybe you could do something like this:
function TokenReplacement(){
var ClassName = 'ms-formlabel';
var elements = new Array();
var elements = document.getElementsByTagName('td');
var numerator=0;
//Now do find and replace on everything else
for(var e=0;e<elements.length;e++){
thiselement = elements[e];
if(thiselement.className == ClassName){
//autonumber the questions by replacing the #num# token
if(thiselement.innerHTML.search('#num#') > -1){
numerator++
var replacenum = "<b>" + numerator + ". </b>";
thiselement.innerHTML = elements[e].innerHTML.replace('#num#',replacenum);
}
}
}
}