Brett

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 66 total)
  • Author
    Posts
  • in reply to: Display Currency conversion on the fly #33251
    Brett
    Participant

      Pasting my custom JS code here for anyone who needs to embed a currency converter.

      
      
      function currencyconvert(){
          
      var fm = "USD";
      var to = "AUD";
      var tz = "timezone";
      var sz = "160x289";
      var lg = "en";
      var st = "info";
      var lr = "0";
      var rd = "0";
      
      if (!sz) {
          var sz = '1x1';
      }
      if (!tz) {
          var tz = '0';
      }
      var arr = sz.split("x");
      var tz = tz;
      var lg = lg;
      var fm = fm;
      var to = to;
      var st = st;
      var lr = lr;
      var rd = rd;
      if (tz == "timezone") {
          var d = new Date();
          tz = d.getTimezoneOffset() / 60;
          tz = 0 - tz;
          tz = tz + "s";
      } else if (tz == "userset") {
          var d = new Date();
          tz = d.getTimezoneOffset() / 60;
          tz = 0 - tz;
      }
      if (!st) {
          st = "info";
      }
      if (!rd) {
          rd = 0;
      }
      if (!fm) {
          fm = 'USD';
      }
      if (!to) {
          to = 'EUR';
      }
      var w = parseInt(arr[0]);
      var h = parseInt(arr[1]);
      if (w == 1 || w < 1 && h == 1 || h < 1) {
          w = '100%';
          if (lr == 1) {
              h = 306;
          } else {
              h = 289;
          }
      }
      ht_protocol = (location.protocol == "https:" ? "https:" : "http:");
       jQuery("#currencywidget").html('<a href="http://'%20+%20ht_protocol%20+%20&#039://currencyrate.today/load-converter?&lg='%20+%20lg%20+%20'&tz='%20+%20tz%20+%20'&fm='%20+%20fm%20+%20'&to='%20+%20to%20+%20'&st='%20+%20st%20+%20'&lr='%20+%20lr%20+%20'&rd='%20+%20rd%20+%20'">http://'%20+%20ht_protocol%20+%20&#039://currencyrate.today/load-converter?&lg='%20+%20lg%20+%20'&tz='%20+%20tz%20+%20'&fm='%20+%20fm%20+%20'&to='%20+%20to%20+%20'&st='%20+%20st%20+%20'&lr='%20+%20lr%20+%20'&rd='%20+%20rd%20+%20'</a>');
      
      }
      in reply to: Display Currency conversion on the fly #33248
      Brett
      Participant

        Hi Alexander,
        I’ve just got this currency converter widget to display on the form.
        https://currencyrate.today/converter-widget

        I extracted their JS code and pasted it in custom JS using a rule to trigger the function on run-time.

        From code in another post, I added

        <div id="currencywidget"></div>

        to the Text or HTML field and within their code, replaced document.write with

        jQuery("#currencywidget").html

        and it works, the widget displays on the form.

        It does take up a bit of space so I’ll use some CSS to push it off to the side.
        Final result attached.
        I think they’ll be happy with this for now.
        Thanks.
        *I tried pasting code here using the tags but my comment is not saving.

        in reply to: Display Currency conversion on the fly #33215
        Brett
        Participant

          If it’s easier, any JS currency conversion widget I can embed in to a DFFS Form would be great. I’ve tried a few but can’t get any to work with IE10/11 and DFFS.

          • This reply was modified 3 years, 8 months ago by Brett.
          in reply to: Random Pairing in Custom List? #31119
          Brett
          Participant

            Thanks Alexander, it’s not a priority and I don’t think there will be much response from people to register their interest, like a random pairing meet n greet type scenario, so it was only if you had it ready to go.
            Thanks.

            in reply to: Random Pairing in Custom List? #31101
            Brett
            Participant

              Hi Alexander,

              I’ve just had this same request from a work colleague.
              Did you end up writing this script to match pairs of list items?

              in reply to: Rule issue for Group ID read only. Possible Bug? #30682
              Brett
              Participant

                Ah I see, it works now.
                I created a new rule for Tab1 and Title field is editable for that Tab only.
                Thanks Alexander.

                in reply to: Rule issue for Group ID read only. Possible Bug? #30663
                Brett
                Participant

                  smaller file attachment here.

                  • This reply was modified 4 years, 6 months ago by Brett.
                  in reply to: How to display Yes/No string column counts in chart? #29377
                  Brett
                  Participant

                    Thanks Alexander,

                    That’s worked.
                    Are there any other instructions on how to configure different charts?
                    The Google documentation is not very helpful.
                    Thanks.

                    in reply to: How to display Yes/No string column counts in chart? #29353
                    Brett
                    Participant

                      Hi Alexander,

                      The Yes/No is showing the same amounts. (file attached)
                      In the Group, sort and substitute tab:
                      Group by first column is ticked.
                      Aggregation function for all columns = Count.
                      Do I need to specificy an advanced grouping array?

                      Also, is there a preferred method to display the count as a percentages in a pie chart?

                      Thanks for your time.

                      Attachments:
                      in reply to: Possible bug double-ups in dropdown #28973
                      Brett
                      Participant

                        Hi Alexander,

                        It was a list I used with single line columns.
                        The first drop down is a single line text and the second dropdown was using the default Title column in the list.
                        I didn’t see a red exclamation mark ❗️

                        Interestingly, each duplicate had different values in the 2nd cascade field.
                        Please don’t waste too much time on this, as its SP2010 and is working ok now.

                        Thanks,
                        Brett

                        in reply to: Possible bug double-ups in dropdown #28951
                        Brett
                        Participant

                          Ah figured it out Alexander, it was the brackets in the column.
                          Removed Brackets and duplicates removed.
                          Image attached.
                          Brett

                          in reply to: vLookup Groupby only for ListView? #28923
                          Brett
                          Participant

                            Thanks for the prompt response Alexander.

                            in reply to: Appended Multi-Line Text Field Questions #27782
                            Brett
                            Participant

                              This worked for me, exactly what I was after.
                              Just tried Keiths script from the Word doc and used it in a rule to trigger the customjs.
                              Expanded the date/time and rearranged the variables.

                              setFieldValue('ActionPerformed','Updated Contract by: ' + user + ' on: ' + dateTime + '<br>' + oldComment  );

                              Thanks heaps for sharing.

                              in reply to: Rules Set field value only if NOT empty #27459
                              Brett
                              Participant

                                Thanks Alexander,
                                It has worked perfectly.
                                Much appreciated.
                                $ for Support sent via PayPal.

                                in reply to: Rules Error Set Field Value using People Picker #27399
                                Brett
                                Participant

                                  Thanks Alexander,

                                  That works perfectly.
                                  Much appreciated.

                                Viewing 15 posts - 16 through 30 (of 66 total)