I need to display data form API in tabular form in wix - dynamic

In my website i have to show data in tabular form which I am getting from API. I successfully integrated API and I am getting response from that API but the problem is I don't know how to show it in a tabular form in Wix.
I tried dynamically adding HTML code in script file but it is not working. Please let me know if there is a way I can do it.

You can put your data in a table element using the rows property.

Related

Attaching a WYSIWYG Library to a Dynamically Generated Input

In a VUE.JS 2 application I'm working on, there is a series of form fields dynamically generated from a JSON Schema. As the Schemas change so do the inputs. (We are using a modified version of this library : https://gitlab.com/formschema/native/tree/feature/new-architecture.
I'd like to attach a Basic WYSIWYG to a particular textarea that was dynamically generated. All the libraries I've come accross need you to manually add the Tag to the template with attributes. Since the form is dynamically generated this seems difficult to do.
Is there a simpler vuejs way to attach a WYSIWYG Editor to a textarea? Perhaps by linking it to a certain ID. The textarea comes prepopulated with data from an API, and that info would need to be included. Any insight is appreciated. I've looked at the following libraries with no success:
https://github.com/ckeditor/ckeditor5-vue
https://github.com/froala/vue-froala-wysiwyg
https://github.com/davidroyer/vue2-editor

react-dropzone: populate field with image already uploaded to server

I have a form that allows the user to upload several images to a server. This form also allows the user to edit the form as well depending upon qs parameters. As additional information, I am using redux-saga with react, just to provide more background.
I am able to upload the image and allow the user to preview the image after they make their selection and before they upload it. However, upon reviewing the documentation, I do not see a way to populate the react-dropzone field when the user edits the other form items. I saw a way to do a preview onDrop but not with data coming from the server. I also found this article on Stackoverflow because am not sure if it could be applied to my case within the redux-saga scenario: How to add the URL of an image already uploaded, to Dropzone?.
Can this be done and if so how can it be achieved?

Rest API calls with PowerApps

I am playing around with Microsoft PowerApps and Microsoft Flow. I am trying to figure out how to make API calls from PowerApps and return the results(Status and Body) to a field such as a text box in my app.
I can make the HTTP requests through Flow and put them in a static file such as an excel spreadsheet...etc. I can also make the calls from a PowerApps control such as a button but all I know how to do with it is return it to something like an excel file, when really I want to return it to a Text Box or Text Area.
Today you cannot access the raw HTTP status/body from a PowerApp. The way to call "arbitrary" HTTP endpoints is to use Custom APIs that you can describe using Swagger. I wrote a quick blog on how to call Azure functions that shows how to craft a swagger to call the API: https://powerapps.microsoft.com/en-us/blog/using-azure-functions-in-powerapps/
Might be good if you could clarify the specific scenario you are trying to build to see if there are other ways, but one option that comes to mind is to build a custom API that receives the URL and on the server-side performs the HTTP request and returns the values in an object that then you can easily access in PowerApps.
It is relatively straightforward to visualize API (JSON) responses using a PowerApps Gallery Control.
Do this:
Ensure the Flow has the correct JSON response before proceeding
Add ClearCollect(colResponse, myFlow.apiRequest()) Function to a Button Control in the PowerApp
Execute the API call (click the button)
Inspect colResponse (View/Collections) to ensure it has content
Insert a blank Gallery Control
Set its Items Property to colResponse
Insert a TextBox Control into the Gallery
Set its Text Property to ThisItem.<someColumn>
Depending on the shape of your JSON response (flat or nested table), you may have to do some wrangling.
There are 3 areas to focus your wrangling:
On the ClearCollect Function.
a. Add some dot notation to the end of this to "dig" into the API response before it hits the Gallery Control
b. Example: ClearCollect(colResponse, myFlow.apiRequest()).someColumn
On the Gallery Control Items Property
a. Add some dot notation to the end of colResponse to "dig" into the Collection
b. Example: colResponse.someColumn
On the TextBox Control within the Gallery
a. Add the First() Function to the Text Property
b. Example: `First(ThisItem.someColumn).someColumn2'
c. Note: There are some JSON schemas that require MULTIPLE First()'s to "dig" into the correct level. First(First(ThisItem.someColumn).someColumn2).someColumn3 etc.
See this video for tips on visualizing API responses in PowerApps Galleries.

Would like to add some custom ajax & javascript to activeadmin based application

Hi guys I'm working on this application using activeadmin. I've come to a point where I would like to add in some ajax based functions. I have the basic form set up using teh activeadmin resource and it generates a very pretty form.
I would like to while the user is entering the details on the form - run a ajax call which would retrieve some html based on the values being entered and populate it on the page.
More likely I would like a way to add custom javascript to the page. Whats the best way to do this - I'm facing issues with returning html without the entire activeadmin layout coming with it.
You can use the /config/initializers/active_admin.rb
You can add javascript resources like this:
config.register_javascript 'my_functions.js'
I use to put code directly to /app/assets/javascripts/active_admin.js
You can also include script in /config/initializers/active_admin.rb

Querystring filter for PerformancePoint

Keep in my I am using Dashboard Designer, SharePoint 2010 and PerformancePoint Server 2010.
I have a dashboard homepage showing a KPI for sales, by brand. I added a custom property "View detailed report" on my KPI. When I click on that, I want to be able to go to a second dashboard page featuring 5 scorecards and 2 reports for my sales, by brand. The brand needs to be a filter.
Obviously, what I wanted to do is to tell my second page on which brand to filter by using a querystring parameter, something like ?BrandFilter=[Brand].[X].[Y] ...
But, in Dashboard Designer, you cannot (?) have querystring based parameters. I know I can do it directly in SharePoint (with the corresponding web part), but then when I deploy my dashboard again, I lose custom changes I do to my pages.
I tried to create a custom transform for scorecards that would read the querystring and add PageFilters, but I faced two problems:
1. I cannot access the HttpContext from there (of couse!)
2. That would not do it for reports.
What should I do? Drop Dashboard Designer and work directly in SharePoint? I wish there is a solution with Dashboard Designer!
Thanks!
I found a way to do that. I customized my scorecard generation (using C#) and added a javascript method to my master page to handle all the links that are clicked. When I click on a link in a scorecard, I get the parameter from the current URL and update a filter inside the page with that. I can share more details on request...