Forum

Forum Replies Created

  • Christian
    Participant
      3 years, 5 months ago in reply to: How to get current user role in JS Script shape? #30111
      Up
      1
      Down
      ::

      Great, thank you, everything works fine now.

      Christian
      Participant
        3 years, 4 months ago in reply to: How to format date in Table cell #30291
        Up
        1
        Down
        ::

        Hi both

        thank you very much for your help! The type binding is very promising 🙂 I will have a closer look at this. You said that it is also possible to have a custom formatter… where would I define this? This information would be a great extension to the knowledge base article… “Use default formatter / create custom formatter”. I guess you have to write a function that can be mentioned in the type binding, but where to define this function?

        You are more than welcome regarding the contribution! It is a lot of fun to work with Simplifier and I highly appreciate the always fast and technically sound help, also for support tickets!

        Best regards

        Christian

         

        Christian
        Participant
          3 years, 4 months ago in reply to: How to use jQuery in Simplifier #30294
          Up
          1
          Down
          ::

          Hi

          as promissed, here the solution (thanks Armin for the inputs):

          • Add the jQuery UI library in the “applications” area (screenshot “library”). Import: dependency to UI5 and adding the CSS style
          • Using the library in the concrete app (screenshot “include”)
          • Create DOM elements and set CSS classes according to jQuery documentation (screenshot “dom”)
          • Set element to be draggable in an “onAfterRendering” triggered JS code snippet (screenshot “code”). Important: when selecting the element via its id, use “#”, as well.

          Should work 🙂

          Attachments:
          You must be logged in to view attached files.
          Christian
          Participant
            3 years, 5 months ago in reply to: CSV Filte to SQLite database #30000
            Up
            0
            Down
            ::

            Hi Jennifer, thank you very much for this helpful answer! I managed to create a new app that uploads an image and displays it. But 🙂 Now I would like to do two changes which do not work:

            • I want to change it to CSV handling, so I changed the mime type to text/csv, changed the FileReader call from readAsDataURL to readAsText, and changed the output mapping so that the resultURL is not used as Image.src, but as Text.text. Unfortunately, the Text widget gets not updated. I use exactly the same process and logic as for updating the image src, but it does not work. Do you have an idea here?
            • I would like to pass the readAsText result to the next Business Object. How do I do this the best way? Do I concatenate two Business Objects in the Process Designer? If yes, how do I pass the parameter?

            Thank you!

            Christian
            Participant
              3 years, 5 months ago in reply to: CSV Filte to SQLite database #30005
              Up
              0
              Down
              ::

              Hi Jennifer

              thank you for this great answer! I think I already found an issue: when I change everything to “CSV” instead of “Image” (see changes above), the Business Object is not loaded when I upload a csv file… when I uploaded an image, I saw that the folder “ClientBusinessObject” ist created and I see the JS-File. When I upload a csv file, this does not happen at all. In the console I do not get an error neither.

               

              Christian
              Participant
                3 years, 5 months ago in reply to: How to bring data to UI5 calendar widget #30096
                Up
                0
                Down
                ::

                I managed it on my own 🙂

                In the Scripts snippet of the Process Designer, you can use the following line to access the calendar component:

                var oCal1 = sap.ui.getCore().byId(“Screen1–ui_unified_Calendar1”);

                Afterwards, you can use the code from the SAP example page. Even though this works I would like to know if this is the best approach to solve this.

                Thank you!

                Christian
                Participant
                  3 years, 5 months ago in reply to: How to get current user role in JS Script shape? #30102
                  Up
                  0
                  Down
                  ::

                  Hi C,

                  thank you for the quick answer. A client-side business object would also be fine, but also here I do not find an approach. I would need this role information to adapt the UI (change some text labels etc., no security related information is impacted).

                  Thank you!

                  Christian
                  Participant
                    3 years, 5 months ago in reply to: How to format date in Table cell #30103
                    Up
                    0
                    Down
                    ::

                    Hi C.,

                    thanks for the answer. I also thought about using JavaScript, but I do not know where to hook it in… as said, I use the datascource and Expression Binding as you can see in the two screenshots. There is no point where I could bring in this JS thingy… do I have to re-design my app for this?

                    Thank you!

                    Attachments:
                    You must be logged in to view attached files.
                    Christian
                    Participant
                      3 years, 5 months ago in reply to: How to get current user role in JS Script shape? #30108
                      Up
                      0
                      Down
                      ::

                      Hi Dan

                      thank you for the answer. So summarized: I get the user role information only in the backend for security reasons. Thus, I have to implement a logic in the frontend that fetches this information from the backend, right?

                      Thanks and best regards

                      Christian

                      Christian
                      Participant
                        3 years, 5 months ago in reply to: How to format date in Table cell #30116
                        Up
                        0
                        Down
                        ::

                        Hi Dan

                        thanks for the answer. The point is: I already mock the data in my server-side business object (SSBO) like this:

                        var termine = [];

                        termine.push({
                        “id”: “11”,

                        “Endtermin”: new Date(“2022-02-28”),

                        });

                        Thus, I already have a nice date object in my JSON response. Noteworthy, the data structure I sent back to the browser is a collection of “termin structs”, and the termin struct has the field “Endtermin” defined as Date. Formatting the date string in the backend would mean to change this and have the struct field “Endtermin” as a String, right?

                        Using the DatePicker widget is not possible, since I have a table with several thousands of entries, so I don’t want to have several thousands of DatePicker widgets in my Screen…

                        What about copying the Text widget and create an own one that formats the String? Would I do this in the “Script” tab of the created widget?

                        Thank you!

                        Christian
                        Participant
                          3 years, 5 months ago in reply to: How to log errors/exceptions in Business Objects? #30130
                          Up
                          0
                          Down
                          ::

                          Hi Dan,

                          thank you very much! I expected that “e” behaves like in the Java world, i.e. being a regular object. Using the three attributes of e works great, thank you!

                          Best regards

                          Christian

                          Christian
                          Participant
                            3 years, 5 months ago in reply to: BO parameter validation not working as expected #30140
                            Up
                            0
                            Down
                            ::

                            Hi Armin

                            thank you very much for the explanation! I implemented a date “translator” in my server-side Business Object that acts as data layer. Here I can translate between ISO 8601 and the standard that is implemented by my RDS.

                            Best regards

                            Christian

                            Christian
                            Participant
                              3 years, 5 months ago in reply to: How to format date in Table cell #30141
                              Up
                              0
                              Down
                              ::

                              Hi Dan

                              I do the formatting now in my data layer, implemented by a server-side business object.

                              Thank you and best regards

                              Christian

                              Christian
                              Participant
                                3 years, 5 months ago in reply to: Measuring performance #30152
                                Up
                                0
                                Down
                                ::

                                Hi Dan, thank you for the quick answer. I assumed that moment is rather a heavy weight JS object so I wanted to use a native one, but from a functionality perspective this works 🙂

                                Christian
                                Participant
                                  3 years, 5 months ago in reply to: Which URL to use for a Server Environment? #30179
                                  Up
                                  0
                                  Down
                                  ::

                                  Ok great, thank you!

                                Viewing 15 posts - 1 through 15 (of 20 total)