How to add rows to an Excel table inside a loop after the columns are mapped?
I tried the "Add rows to an Excel table" step, but I can't grab the values from Column1 and Column2 on the "Select" step above.
This should be easy, I guess, but I can't make it.
Thank you,
Your "Select" actions looks like it might be missing something, seems like it will add the whole item to "Column1" and duplicate that for "Column2". If your value is an array but it is not being recognized as so, you can use the "Parse JSON" action, or the json() expression you should be able to select the keys that you want to use for each column.
I might need more details to see the exact issue with your flow, but in the meantime try this:
Parse JSON action
Here the "Initialize variable" will be your blob storage result.
In the Parse JSON, add you blob storage value
In the "Select" action use the body output of the "Parse JSON" action
You should be able to select the specific values you want in your columns
json() expression
The parameter will be your blob storage. In my example is my string variable sown in the image.
Since the "Select" action returns an array as a result, the next step you should use is the "Apply to each" action
The new values mapped in the "Select" action should be available to be used here, if for any reason they are not (it is common for power automate to have issues like this) you can use an expression to get the value
items('Apply_to_each')?['columnName']
Note that the "Apply_to_each" inside "items" will be different if you rename this action.
Then, you'll have your Excel file with all the rows added to the table you selected.
How can I loop thru all changed columns in a sharepoint list.
I use the
TRIGGER "When a item or file is modified" and then the
ACTION "Get changes for an item or a file (properties only)"
I thought I can loop thru the dynamic content "Column has changed" (A Collection showing which columns have changed)
But this is not a list of changed columns, this is a Object with all columns in the SP-List an a Status "true" or "false" if it is changed or not.
What I want to do, is to loop thru all changed columns and use SWITCH to define next steps per column.
Unfortunately there is no graceful way to do this as of now. However you can achieve this by keeping a reference of all your columns from SharePoint list.
Initialise an array variable ColumnNames and fill all your column names from SP list as it's input. I am taking top 4 columns from your setup. ID, Title, Ticketno, Service_Type
Initialise 2nd Array variable ChangedColumns to collect your changed column names. See the first image below.
Now use a for loop and iterate over ColumnNames and put a condition to check if current item (which will be the column name) value is true or not. If that's true then add it to ChangedColumns array, which we initialised to collect changed column names. The expression you need to use in condition is written as comments in the image itself.
I want to populate text fields from a table selected first from a LOV and user input.
How can I do it in apex? How can I manipulate that with processing ?
For small amount of values, I prefer Select List item as it looks nice; if there are many values, it can't handle it so I use a Popup LOV instead.
In order to populate certain fields with values, you can use a dynamic action whose action is Set value (and there you can choose how to do it; for example, using some PL/SQL code).
I currently have a tablix that looks like this:
I also have three parameters:
When the user selects the report parameter, this tell the query what columns in expected value to show. So the columns pivoted are dynamic based on that parameter.
If the user selects multiple parameters for report, I'd like the report to page break based for each parameter they choose.
Example:
Here the user chose ILO, IP, and LogicDrive for the report parameters. These are all the columns that will show in expected value.
Instead off all them being grouped together, I'd like the to create individual column groups with a page break in between.
Is this possible?
Update
I managed to get the column values grouped by the parameter:
I created a parent column group like this:
Now my issue is getting the page breaks in between each column grouping.
I read based on this Microsoft doc that it may not be possible:
https://learn.microsoft.com/en-us/sql/reporting-services/report-design/add-a-page-break-report-builder-and-ssrs
It says: Page breaks are ignored on column groups.
Is this still true?
I have two select lists
1. The first one P4_country_id_B contains countries names
select country_name as d, country_id as r
from countries
2. The second one P4_CITY_ID_B contains cities of a country based on selected value in P4_CITY_ID_B.
select city_name as d, city_id as r
from cities
where country_id = :P4_country_id_B
Everything goes OK without any problem.
BUT
I use Execute PL/SQL Code Dynamic Action to change selected values of those lists like this (for example):
:P4_country_id_B:=country_returned_value;
:P4_CITY_ID_B:=city_returned_value;
Where
country_returned_value : is a one value of countries list values for example (USA)
city_returned_value : is a one value of cities list values for example (NewYourk).
The first selected list value changes but the second list never changes.
Notes:
I used P4_country_id_B,P4_CITY_ID_B as Page Items to Submit for the dynamic action.
I don't whan to submit the page instead of dynamic action
How can I change list values in this case please?.
Thanks in advance.
Cascading select lists are refreshed through ajax.
Change select list 1, select list 2 will be refreshed.
You execute plsql, which in turn will set the value of the items involved. Both are select lists, and one is dependent on the other.
So while both will be set, the change of the first one will cause the second to be refreshed.
In other words, you're doing it too fast. And while there is a solution, the proper way is a bit complex and I wouldn't build it in DA's personally.
You haven't specified how or when you call the code which sets the values for the items. So here I'll just assume a DA with an action of type "Execute JavaScript" (for example)
// perform a call to the ajax callback process to get the country and city id
// there are several ways to provide values to the process if necessary.
// for example through x01, which can be used in the proces like
// apex_application.g_x01
apex.server.process('GET_COUNTRY_DEFAULTS', {x01:""}).done(function(data){
// process returns JSON which contains 2 properties: country_id and city_id
// data.country_id
// data.city_id
// bind a ONE-TIME handler to the after refresh event of the city
// cascading LOVs fire the before and after refresh events like any other
// refreshable element in apex
// a one time handler since the values are different each time this code will
// execute
apex.jQuery("#Px_CITY_ID").one("apexafterrefresh",function(){
// after refresh of the list, attempt to set the value of the list to the
// value retrieved earlier
apex.item(this).setValue(data.city_id);
});
// finally, set the value of the country. Doing this will also trigger the
// refresh of dependent elements
apex.item('Px_CITY_ID').setValue(data.country_id);
// since a handler has been bound, the refresh will occur, the after refresh
// triggers, and the value will be set properly
});
Finally, create a new process on the page under "AJAX Callback", and name it GET_COUNTRY_DEFAULTS
DECLARE
l_country_id NUMBER;
l_city_id NUMBER;
BEGIN
l_country_id := 8;
l_city_id := 789;
htp.p('{"country_id":'||l_country_id||',"city_id":'||l_city_id||'}');
EXCEPTION WHEN OTHERS THEN
-- returning an error while using apex.server.process will prompt the user
-- with the error and halt further processing
htp.p('{"error":"'||sqlerrm||'"}');
END;
That should tie everything together.
I think there is some confusion here. My answer below, assumes, according to your question, the first list name is P4_country_id_B, and the second list name is Cities_LOV. If that is not the case, please clarify.
Your first list called P4_country_id_B, and you assign it to itself through the following statement:
:P4_country_id_B:=country_returned_value;
So basically, nothing has changed, the value of P4_country_id_B is the returned value of your list P4_country_id_B without any need for this assignment. Note, it is not clear to me, what is country_returned_value, because P4_country_id_B holds the returned value.
Secondly, you have a list called Cities_LOV, and you assign the returned value to P4_CITY_ID_B page item, through the following statement:
:P4_CITY_ID_B:=returned_city_value;
Again, I am not sure what is returned_city_value, because Cities_LOV holds the returned value of that list.
I am not sure what you are trying to achieve here. But I assume, you want to allow the user to select the Country first, and then based on that, you want to refresh the Cities list to display the cities in that particular country. If that is the case, then use a dynamic action on P4_country_id_B value change, to refresh the value of Cities_LOV. You only need to pass P4_country_id_B to that dynamic action.
UPDATE
After you corrected the wording of the question, the answer would be like this:
In your child list P4_CITY_ID_B make sure you set the option Cascading LOV parent item(s) to the parent list P4_country_id_B. You do not need the dynamic action. The child list, should refresh upon the change of the parent list. The answer here, goes in details about how to implement cascading list