Load the logged in User name into a Variable Set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 11:48 AM - edited 04-25-2024 05:18 AM
Hey guys!
Has anyone done any development with the following requirement:
This POST was edited:
I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.
In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.
As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).
The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.
When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 01:33 PM
Hi Luis,
If I'm understanding your issue, you have the correct value being inserted On Load. If that is what need to be there, I'd say that in your On Load as part of the processing, just make that variable read only. If you can't do that, add an On Change rule that will take care of these two situations:
- if isLoading is true, apply your On Load logic (having turned off the on load script)
- if the value is changed have your script replace the value with oldValue
And if you want to be really diligent, include a business rule, before insert, that enforces the requirement about the user.
Please let me know if I've missed your issue.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 11:55 AM - edited 04-24-2024 11:57 AM
Hi, @johnfeist !
thanks for your response.
I believe I explained it in a confusing way.
I will try to explain the requirement again.
I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.
In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.
As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).
The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.
When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 05:45 AM
Hey @Luis Henrique1
for the onload script you can use onchange client script
In this function write the code : g_user.userID(); or if server side use gs.getUserID() and return from script include to client script.
if (isLoading || newValue === '') {
return;
}
Please accept the solution /mark this response as correct or helpful if it assisted you with your question.
Regards,
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 11:55 AM - edited 04-24-2024 11:56 AM
Hi @AnimeshP_96
thanks for your response.
I believe I explained it in a confusing way.
I will try to explain the requirement again.
I have 2 RECORD PRODUCERS. In the first RP, the user will answer some questions and submit. The information as we know it will be saved in the destination table that we previously defined.
In the second RECORD PRODUCER, I have some unique fields from it. However, I also have a variable of type reference, which takes the numbers of the records created in the first RP. In other words, I have information about the fields of each record. And according to the number selected by the user, I can populate the fields according to some responses from the first RP.
As an example, if in RP1 I fill in a choice field as "Yes", a certain field in RP2 will be filled in with that value and display another field. (This already works through a Script Include - Client Callable and a Client Script that makes the GLIDEAJAX call, when the field changes).
The current requirement, in some way, meets what was previously described. In this second RECORD PRODUCER, I have an MRVS created, with a reference type variable for sys_user.
When a certain checkbox type field (in RP1) is marked, I need to fill in this MRVS with the logged in user record. My question is: Can I accomplish this with the same Script Include + Client Script process? Even though it is MRVS, because I did the other cases with variables only.