How to capture the output of a previous action in power automate - power-automate

I want to capture the output of an action in a variable, in Power Automate. I am using body('action name'), but getting an error:
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The action(s) 'Create record' referenced by 'inputs' in action are not defined in the template.'.'.

Try with the expression outputs('action_name')
Link to documentation: https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#outputs

Related

Laravel - Get error message from localized file

I'm creating my own validation and need to retrieve error messages from the localized file(resources/lang/en/validation.php and etc). The main task is to get array of error messages from the appropriate file. Usually, the validator does it and you don't need to worry about it. Does exist a way to get all these messages with no using validator?
You can access your translation files and their contents from anywhere with the global helper function trans
For example: your translations are in the file resources/lang/en/customvalidation.php
return [
'customerror' => 'my custom error message',
];
Then
trans('customvalidation.customerror')
will return "my custom error message" (depending on the current set language)

Find file that generated error CSRF TOKEN

I set up the handler file for whenever there is an error on the server, I receive an email with the details.
So today I received an email with the following error:
array (3) {["message"] => string (0) "" ["file"] => string (104)
"/var/www/infochat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php"
["line"] => int (71)}
I know what this error is, but the problem is that I do not know what caused it, what file or code it was responsible for.
I did not find anything in the logs (I may have seen the wrong log). Is there somewhere I can check to find out?
There is absolutely no way to tell which file sent it if that's the only thing youre getting from the error stack on your email.
I'd get a cup of coffee, fire up the IDE and start doing a "Find all" for "

Error: Unknown slot type 'LIST_OF_COLORS' for slot 'Color'

Hi while following the tutorial: https://developer.amazon.com/de/alexa-skills-kit/alexa-skill-quick-start-tutorial
for building Alexa Skills I run into the following exception:
Error: There was a problem with your request: Unknown slot type 'LIST_OF_COLORS' for slot 'Color'
The error message does not state whether or not it was not able to parse the provided LIST_OF_COLORS definition of if something else went wrong.
Is this a Amazon Alaxa bug or did I miss something there?
I got this error because I didn't actually create the custom type - I needed to click both the Add and the Add Slot Type button.
Step 1: Create your type and values.
Step 2: Commit your changes.
Found a solution:
The Add Button, from Custom Slot Types, did not work the first time I hit it, I tried it again, and the list changed into:
From there on, it has worked as described

Peoplecode function not working

I am using Peoplecode which is a Peoplesoft coding language.
I am trying to access JUST the 'message text' from a message catalog.
It pulls the correct number 7373 when I use the same code on another page.
But in this instance it returns the message
'GetMessageText: No default message. (2012,2012)'.
Here is the code I am using..
&cur_year = Year(%Date);
&MsgNum = MsgGetText(2012, 2012, "");
It's because it can't find the message (2012,2012). You have to specify the correct message set and message number to retrieve from the message catalog.
Look here:
http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tpcl/book.htm?File=tpcl/htm/tpcl02.htm%2337ee99c9453fb39_ef90c_10c791ddc07__3cd3

Implementing Database Error Handling in CodeIgniter

I am creating a webapp using codeigniter. I want to implement a error handling function. Say for example if I call a method of a model, and if an error occurs in that method, the error handler comes into action to return some pre-formatted string.
I was thinking of creating something like MY_Model, which every model class extends. Then, I can add the error handler in MY_Model class. But whether this can be done is beyond me right now. (yes I am a newbie at this)
Any enlightening ideas will help.
Regards
What I tend to do is return an array instead of a boolean. This array contains 2 keys, 'return' and 'error'.
In case of an error this array will look like the following:
array('return' => FALSE, 'error' => 'Some error')
In case of a successful execution this array will look like the following:
array('return' => TRUE)
The controller then verifies these results and if there's an error it will display the one set in the 'error' key.

Resources